[rabbitmq-discuss] Queue Clustering and Sequencing

RogerF roger.fischer at abb.ventyx.com
Tue Oct 25 18:32:26 BST 2011


Yes, only messages with the same key depend on each other. The
messages cause a state change of the object identified by the key. A
subsequent message must see the state change maded by the preceeding
message.

Here is an example.

Incoming message sequence (with key):

M1(a), M2(b), M3(b), M4(c), M5(b), M6(d), M7(e), ..., M99(b), ...

M1, M2, M4, M6 and M7 can be processed in any sequence. They have
different keys, and are thus independent.

M3 must only be processed after M2 has complered processing. They have
the same key, and thus are related. The state change effected by M2 in
the database must be visible to M3.

Similar, M5 must only be processed after M3 has completed processing.

M99 also has the same key as M2, M3 and M5. However. M99 arrives so
much after M5 that there is no risk that the state change effected by
M5 is not already committed in the database. Thus M99 can be
arbitrarily load balanced.

Essentially what we want is key-based load balancing with time-limited
affinity.

Roger



More information about the rabbitmq-discuss mailing list