[rabbitmq-discuss] Cluster failover behaviour

Robert Borkowski rborkowski at ideeli.com
Mon Dec 14 23:33:03 GMT 2009


So what is going on in my test case?

I restart rabbitmq and I suddenly have a bunch of old messages in the queue.
Surely that's not expected

--
Robert Borkowski

On Mon, Dec 14, 2009 at 6:29 PM, Matthias Radestock <matthias at lshift.net>wrote:

> Robert Borkowski wrote:
>
>> Agreed, and that's why I'm testing failure scenarios.
>>
>> It would be nice to not to have to re-invent the wheel :-)
>>
>> Isn't this a somewhat common use-case? A work queue filled with
>> tasks that can only be run once, running on real hardware which
>> means that at some point parts of the system WILL fail.
>>
>
> "at-least once" and "at-most once" execution are quite easy to do. "exactly
> once" is generally impossible. In case that is not obvious, think about what
> precisely it is that you want to happen exactly once. Then try to figure out
> how you'd perform that action *and record the fact that it has happened* in
> one atomic action.
>
> By far the easiest way to get around that is to make the desired action
> idempotent. Then it is sufficient to guarantee "at-least once" execution,
> which is easy to do in AMQP by ack'ing messages after the actions that they
> trigger have been completed.
>
>
> Regards,
>
> Matthias.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20091214/684cb7c8/attachment.htm 


More information about the rabbitmq-discuss mailing list