[rabbitmq-discuss] Redelivery of unacknowledged messages
Jonatan Kallus
jonatan at heysan.com
Thu Oct 2 01:48:40 BST 2008
Is it meant to work like this or is it a matter of a feature not being
implemented yet?
In my current implementation I am closing the channel occasionally, for no
particular reason, but to get the redeliveries. This causes the processing
to temporarily stop or slow down since I have to wait for all tasks to be
done and acked before I can close the channel. (Since messages need to be
acked on the same channel they were received on, as far as I know.)
It would probably be possible to have two parallel channels open, one active
(receiving new tasks) and one waiting for its tasks to be done and acked,
then closing the inactive one, making the previously active one passive and
opening a new active channel. This would add the complexity of keeping track
of what message that should be acked on what channel.
Are there any good patterns to handle this?
On Tue, Sep 30, 2008 at 12:01 AM, Matthias Radestock <matthias at lshift.net>
wrote:
> Ben Hood wrote:
>>>
>>> When are unacknowledged messages redelivered?
>>
>> After the channel in which the initial receive has been closed and a
>> new channel has been setup.
>
> To be precise, unacknowledged messages become eligible for redelivery when
> the channel (or connection) on which they have been delivered is closed.
>
> If a queue has more than one consumer, the message will be delivered to
one
> of the remaining consumers. Otherwise it will be enqueued and can thus be
> consumed by a consumer which comes along later.
>
>
> Matthias.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20081001/8e6b7eea/attachment.htm
More information about the rabbitmq-discuss
mailing list