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

Monish Unni monish.unni at gmail.com
Thu Apr 26 17:17:00 BST 2012

Thanks Emile for trying out the sample code!

I do have  a 3 second timeout when consuming messages.
so what's an appropriate wait time? what would be "long enough" ?


On Thu, Apr 26, 2012 at 7:57 AM, Emile Joubert <emile at rabbitmq.com> wrote:
> Hi,
> 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
> message=NO_CONSUMERS]
> and this message if the exchange is not bound to a queue:
>  [ERROR:Service :REPLY_QUEUE seems down, returning with code=312
> message=NO_ROUTE]
> -Emile

"we use light to see , ergo, we can never see light."

More information about the rabbitmq-discuss mailing list