[rabbitmq-discuss] Termination of queue after sending a message.

Simon MacMullen simon at rabbitmq.com
Wed Oct 24 13:08:46 BST 2012

On 24/10/12 12:40, Ernest Staszuk wrote:
> Hi,


>      3. Another consumer got this message while listening on
> "failed-messages-queue",
>          stored content and headers in memory and sent acknowledgement.

Note that at this point it looks like it garbled the "x-death" header, 
flattening it to a string.

>      4. After a certain time there is made an attempt to sent message
> stored in memory
>          to the queue form which it was rejected at first (explicitly
> saying to the "to-process" queue).
>          To be more precise we are trying to send a message to exchange
> null with routing key "to-process".
> And then queue "to-process" vanished unexpectedly. In logs of RabbitMQ
> we found error.

The queue crashed.

> Due this we have some questions:
>      - Why did that happen? Is something wrong with what we are doing?

Yes, you flattened the header...

>      - Why queue terminated? In my opinion this should never happen
> (even if the message we sent back was broken, I mean isn't that a
> security issue?).

...but we should still handle that properly! So we would definitely 
consider this a bug.

>      - What did happened to the messages that was in "to-process" queue?
> Is there any way to find and restore them?

In-memory messages will be lost. On-disc messages should come back once 
the node is restarted.

>      - Does terminating a (durable) queue can result in messages lossing?

Yes. Non-persistent messages in the queue will be lost anyway. 
Persistent messages can be lost if they have not yet made it to disc. 
Any messages which have been confirmed to clients (or where the client 
has seen a transaction commit successfully) will definitely be on disc 
and should be recovered.

Cheers, Simon

Simon MacMullen
RabbitMQ, VMware

More information about the rabbitmq-discuss mailing list