[rabbitmq-discuss] [ANNOUNCEMENT] Introducing Lyra: A High Availability RabbitMQ Client

Matthias Radestock matthias at rabbitmq.com
Thu Oct 31 07:27:28 GMT 2013


On 31/10/13 02:49, Jonathan Halterman wrote:
> We could cache delivery tags for channels internally, but I'm
> hesitant to go down that road.

It wouldn't help anyway, since, as a mentioned, the same delivery_tag
can appear on both the old and new incarnation of the channel.
delivery_tags are just counters, starting from 1 on a fresh channel.

> While Lyra certainly makes it easier for this scenario to pop up,
> rare as it might be,

It's not rare at all. You are guaranteed to end up in that scenario
anytime a recovery takes place while a consumer is processing a message.

> the same problem could occur without Lyra when swapping a consumer
> over to a new channel after the consumer is unexpectedly cancelled
> and/or the channel is unexpectedly closed.

Absolutely. Don't do that :)

> That said, no good solutions come to mind just yet. Do you have any
> ideas?

The scenario is impossible to address without changing the API. Bunny 
does that with the VersionedDeliveryTag. The Messaging Patterns 
libraries we wrote some years ago do it by making ack() take the entire 
Message data structure, and have that include the channel version. See 



More information about the rabbitmq-discuss mailing list