[rabbitmq-discuss] Dead-Lettering Queue Contents On Queue Expiration

Matthias Radestock matthias at rabbitmq.com
Fri Jan 17 00:57:36 GMT 2014


On 14/01/14 19:20, Alex Robson wrote:
> The way we solve for this (within the realm of Rabbit) is to have a
> consistent-hash exchange that hashes the correlation-id which is set to
> our aggregate root (parent record id). This allows us to bind a
> queue-per-service-instance and get the isolation guarantees we like
> while still allowing us to horizontally scale. The problem with this
> approach is that in the event that a service loses its connection/falls
> over, messages in the queue sit and can be 'orphaned'.
>
> If we use a queue TTL policy for these kinds of queues, it will allow us
> to prevent orphaned queues, but presently it does not appear that the
> messages in the queue are published to the defined dead letter exchange.
> Since messages with a TLL behave this way, it seems logical that
> messages within a queue that expires could/should also take advantage of
> the same behavior.
>
> I believe it would be a real win for users everywhere as it allows for a
> really clean way to scale horizontally without increasing
> race-conditions, requiring distributed locking patterns or introducing
> failure modes that could result in message loss or dramatically
> increased latency in message processing.

How would you prevent messages from getting lost that are en-route to a 
queue that is about to expire?

Matthias.


More information about the rabbitmq-discuss mailing list