[rabbitmq-discuss] Lockup in QueueDeclare()

Emile Joubert emile at rabbitmq.com
Tue Jul 10 10:28:45 BST 2012


Hi,

On 09/07/12 15:25, Galmok wrote:
> Now, I call QueueDeclare() from a callback

The .NET guide contains information about this in the section "2.9.
Threading, deadlocks, and associated restrictions on
consumers". It explains that "Only asynchronous AMQP operations without
content are safe for use within callbacks [...]". Queue declare (without
the no-wait option) is a synchronous operation (queue.declare followed
by queue.declare-ok), and therefore not allowed in callbacks.

The recommended approach is to use the QueueingBasicConsumer to make
sure deliveries are processed in an application thread.

The RabbitMQ Java client is free from this restriction, but the .NET
client lags behind in this respect.


-Emile




More information about the rabbitmq-discuss mailing list