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

Richard Raseley richard at raseley.com
Wed Oct 16 23:33:15 BST 2013


Michael,

Thank you for your reply. With regard to your comment:

"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."

Do you mean to say that those "voided" messages didn't make it to a queue
or weren't hashed but simply put to an arbitrary queue? I know the former
isn't the case because I sent 500K messages and at the end of the test the
total of all the queues was 500K.

Regards,

Richard


On Wed, Oct 16, 2013 at 2:43 PM, Michael Klishin <mklishin at gopivotal.com>wrote:

>
> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131016/350b4047/attachment.htm>


More information about the rabbitmq-discuss mailing list