[rabbitmq-discuss] Old consumer tags delivered after re-subscribing to a queue

Matthew Sackman matthew at lshift.net
Fri Apr 2 18:12:27 BST 2010


On Fri, Apr 02, 2010 at 05:54:32PM +0100, Matthew Sackman wrote:
> At the very least, the basic.recover_ok should contain a new ctag (which
> for symmetry suggests the client should be able to specify one in
> basic.recover to mirror basic.consume and basic.consume_ok) which the
> client can then use to identify these deliveries and route them
> accordingly.

Oh and of course, there's no basic.recover_ok until you get to AMQP
0-9-1. And even if you could specify a ctag, you'd need to know when
the stream ends too. It should probably be something like:

C=>S: basic.recover [optional ctag; requeue=false]
S=>C: basic.recover_start [ctag either server generated or as specified]
S=>C: basic.delivery [ctag set as in recover_start]
...
S=>C: basic.recover_end [ctag set as in recover_start]

That way clients would have some idea of knowing what to do with the
recovered messages, and when to stop. Another idea would be to have
the _ok variant as in 0-9-1 but to put a count in it so that the
clients know how many messages to expect:

C=>S: basic.recover [optional ctag; requeue=false]
S=>C: basic.recover_ok [ctag either server generated or as specified; count=N]
S=>C: basic.delivery [ctag set as in recover_start]
...

Matthew




More information about the rabbitmq-discuss mailing list