Reputation: 91
In a Remote Client Procedure (RPC) configuration, client queues are declared exclusive as it is shown in the official tutorial. If a client consumes a message from its exclusive queue and it crashes before acknowledging it, I would expect the message to be automatically requeued if the queue was still alive, but in this case, as the queue is exclusive, the queue doesn't exist any longer and the message is not being requeued.
Is there any way to make this scenario more reliable? Is there any way to requeue those messages into another queue which is still alive? I thought I might use Dead Letter Exchanges, but it seems this kind of messages (for which the server is unable to requeue after a consumer crash) are not managed by DLX.
I have undefined number of client processes, so I'm afraid queues must be exclusive, because each process has its own queue.
Any help would be appreciated.
Upvotes: 1
Views: 556
Reputation: 1714
If exclusive consumption and consumption continuity are required, single active consumer may be more appropriate.
Single active consumer allows to have only one consumer at a time consuming from a queue and to fail over to another registered consumer in case the active one is cancelled or dies. Consuming with only one consumer is useful when messages must be consumed and processed in the same order they arrive in the queue.
You can visit documentation to learn more.
Upvotes: 0