[rabbitmq-discuss] Lockup in QueueDeclare()

Galmok galmok at gmail.com
Mon Jul 9 15:25:29 BST 2012

I have an issue with QueueDeclare locking up on me. It works fine for the 
most part, but eventually, it locks up (no error, just doesn't return). I 
have tried to find out where it happens and this is the spot:

When running:


RabbitMQ enters an idle state at the line marked below:

namespace RabbitMQ.Client.Impl
    public class SimpleBlockingRpcContinuation : IRpcContinuation
        public virtual Command GetReply()
====>>>     Either result = (Either)m_cell.Value;
            switch (result.Alternative)

Now, I call QueueDeclare() from a callback created like this (I receive a 
message from AMQP and create/bind to a new queue):

        public string subscribe(string routingKey, BasicDeliverEventHandler 
e )
            lock (channel)
                string queueName = channel.QueueDeclare();
                EventingBasicConsumer consumer = new 
                consumer.Received += e;
                string consumerTag = channel.BasicConsume(queueName, true, 
consumer); // true; noAck
                channel.QueueBind(queueName, ExchangeName, routingKey);
                return queueName;

Is it not allowed to create/bind to a new queue when being called from this 
callback? Can I avoid the lockup somehow?

I use 'lock' to avoid triggering the non-multithread safe .NET 
implementation. Could this be an issue here?

Any hints would be nice here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120709/5f9594c6/attachment.htm>

More information about the rabbitmq-discuss mailing list