[rabbitmq-discuss] Unexpected Behavior When Using the "X-Consistent-Hash" Exchange Type

Michael Klishin mklishin at gopivotal.com
Wed Oct 16 22:43:23 BST 2013


On oct 16, 2013, at 11:58 p.m., Richard Raseley <richard at raseley.com> wrote:

> 1) Why am I seeing such uneven distribution of messages between the queues bound to the x-consistent-hash exchange?
> 
> 2) What can I do to ensure the most even distribution of messages as possible across the queues bound to the x-consistent-has exchange?

Consistent hash exchange requires routing keys to be integers *as strings* (yes,
this is unfortunate, but routing keys have to be strings in the protocol).

My guess is that when you use UUIDs, implicit conversion happens and those
that happen to have digits as initial characters result in messages being routed
but others are voided. You can try publishing the messages as mandatory
and see if any of them are returned.

This requirement is mentioned in README:

http://hg.rabbitmq.com/rabbitmq-consistent-hash-exchange/file/rabbitmq_v3_1_5/README.md#l99

See https://github.com/ruby-amqp/bunny/blob/master/spec/higher_level_api/integration/consistent_hash_exchange_spec.rb
for example (not in Python but hopefully demonstrative enough).

MK



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131017/ebf66447/attachment.pgp>


More information about the rabbitmq-discuss mailing list