[rabbitmq-discuss] strange behavior with non-persistent message settings

Ben Hood 0x6e6562 at gmail.com
Sat Jul 18 11:45:47 BST 2009


On 18 Jul 2009, at 02:33, Amit Rathore <amitrathore at gmail.com> wrote:

> I'm a RabbitMQ newbie, so this may be that I'm doing something  
> stupid...
>  I'm using TEXT_PLAIN field from MessageProperties to send a message
> - this is supposed to set the deliveryMode property to 1 which means
> non-persistent. However, when the consumer comes up (after a producer
> already sent a message), it receives the message. It shouldn't right,
> since it was non-persistent.

If there is a bound queue, then any messages will get routed,  
irrespective of whether there is a consumer or not. One way to bind  
the queue's lifecycle to the consumer is to set the auto-delete flag  
on queue declaration, or just nuke it yourself. BTW reading the spec's  
description of the commands helps understand the model semantics.



More information about the rabbitmq-discuss mailing list