[rabbitmq-discuss] [Q] best way to add a sequencer to the broker
0x6e6562 at gmail.com
Tue Dec 30 00:36:59 GMT 2008
On Tue, Dec 30, 2008 at 12:13 AM, Chuck Remes <cremes.devlist at mac.com> wrote:
>> As indicated above, setting this for each message would not be too
>> difficult to do. Given a mechanism to maintain a global counter, it
>> would be less effort to do the custom exchange that any external relay
> This has helped immensely. Can you provide a pointer to an example custom
There isn't one really, but if you look in the deliver/5 function in
the rabbit_router module, all you have to do is to fold the global
counter into each message that gets applied to the list of queue
endpoints. This would be one way to skin the cat.
You still have the problem of how to maintain the global counter though.
Having said this, are you interested in strict ordering as if it were
be monitored by some all-knowing being or is it just a case of needing
to be able to replay the same order?
If your application could tolerate some perceived re-ordering, but
still replays in the same order, you could request batches of ordering
keys from your globally visible state. The effect of this would allow
a degree of parallelization at the cost of some stuff *appearing* to
have arrived out of the *true* global order. But you could replay in
the same order and the things were stamped.
Having said that, you might find using plain jane timestamps easier,
if you can relax this true global ordering constraint a bit.
More information about the rabbitmq-discuss