Hello,

We have an Erlang application that uses multiple nodes each with
several rabbitmq consumers connected to different queues. When a node
goes down, its consumers are rebalanced among the rest running nodes.

However, there's a problem. It may take minutes between message
consumption and acking, so most likely when a node goes down, there
are some messages that have been consumed but haven't been acked. And
seems like in that case the newly spawned consumers that are
rebalanced to the other nodes don't get those unacked messages, since
they are already considered to be consumed.

So, my question is, is there a way to make all unacked messages in a
queue become ready for consumption again?

Thank you.

--
Best regards,
Dmitry Demeshchuk

Search Discussions

  • Dmitry Demeshchuk at Sep 1, 2011 at 5:30 am
    Looks like basic.recover is what I want, right?
    On Thu, Sep 1, 2011 at 9:24 AM, Dmitry Demeshchuk wrote:
    Hello,

    We have an Erlang application that uses multiple nodes each with
    several rabbitmq consumers connected to different queues. When a node
    goes down, its consumers are rebalanced among the rest running nodes.

    However, there's a problem. It may take minutes between message
    consumption and acking, so most likely when a node goes down, there
    are some messages that have been consumed but haven't been acked. And
    seems like in that case the newly spawned consumers that are
    rebalanced to the other nodes don't get those unacked messages, since
    they are already considered to be consumed.

    So, my question is, is there a way to make all unacked messages in a
    queue become ready for consumption again?

    Thank you.

    --
    Best regards,
    Dmitry Demeshchuk


    --
    Best regards,
    Dmitry Demeshchuk
  • Marek Majkowski at Sep 2, 2011 at 9:34 am

    On Thu, Sep 1, 2011 at 06:30, Dmitry Demeshchuk wrote:
    Looks like basic.recover is what I want, right?
    Yes, looks like it:
    http://www.rabbitmq.com/amqp-0-9-1-quickref.html#basic.recover

    On Thu, Sep 1, 2011 at 9:24 AM, Dmitry Demeshchuk wrote:
    Hello,

    We have an Erlang application that uses multiple nodes each with
    several rabbitmq consumers connected to different queues. When a node
    goes down, its consumers are rebalanced among the rest running nodes.

    However, there's a problem. It may take minutes between message
    consumption and acking, so most likely when a node goes down, there
    are some messages that have been consumed but haven't been acked. And
    seems like in that case the newly spawned consumers that are
    rebalanced to the other nodes don't get those unacked messages, since
    they are already considered to be consumed.

    So, my question is, is there a way to make all unacked messages in a
    queue become ready for consumption again?

    Thank you.

    --
    Best regards,
    Dmitry Demeshchuk


    --
    Best regards,
    Dmitry Demeshchuk
    _______________________________________________
    rabbitmq-discuss mailing list
    rabbitmq-discuss at lists.rabbitmq.com
    https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
  • Matthias Radestock at Sep 2, 2011 at 9:41 am

    On 02/09/11 10:34, Marek Majkowski wrote:
    On Thu, Sep 1, 2011 at 06:30, Dmitry Demeshchukwrote:
    Looks like basic.recover is what I want, right?
    Yes, looks like it:
    http://www.rabbitmq.com/amqp-0-9-1-quickref.html#basic.recover
    Note however ...
    So, my question is, is there a way to make all unacked messages in a
    queue become ready for consumption again?
    basic.recover acts on the *channel*, not the queue, i.e. it will cause
    all messages delivered on the specific channel to be redelivered/requeued.

    Also, the client owning the channel must not subsequently ack any of the
    messages that were recovered, or the broker will complain. That's why
    there is a synchronous version of 'basic.recover' since otherwise the
    client has no idea which messages were recovered, namely all messages
    received before the basic.recover-ok.


    Matthias.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedSep 1, '11 at 5:24a
activeSep 2, '11 at 9:41a
posts4
users3
websiterabbitmq.com
irc#rabbitmq

People

Translate

site design / logo © 2022 Grokbase