[rabbitmq-discuss] immediate, mandatory flag with no consumers

Emile Joubert emile at rabbitmq.com
Thu Apr 26 15:57:45 BST 2012


On 25/04/12 20:27, cogitate wrote:
> i am trying to understand the usage of "immediate" and "mandatory" vis-
> a-vis when there are no consumers, to get rabbitmq broker to call
> handleReturn callback, after i setup returnListener.
> i ran through the following scenarios:
> 1. no exchange, no queue
> 2. exchange, no queue
> 3. exchange, queue - no consumers
> but, i don't get a return call from the server.

Do you give the return call time to be called? The channel will need to
remain open for long enough after the publish. If you close the channel
immediately after the publish then you won't see output. Using your
sample code I receive this message if no consumers are present:

 [ERROR:Service :REPLY_QUEUE seems down, returning with code=313

and this message if the exchange is not bound to a queue:

 [ERROR:Service :REPLY_QUEUE seems down, returning with code=312


More information about the rabbitmq-discuss mailing list