[rabbitmq-discuss] Cluster failover behaviour
Matthias Radestock
matthias at lshift.net
Mon Dec 14 23:29:51 GMT 2009
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.
More information about the rabbitmq-discuss
mailing list