[rabbitmq-discuss] Topic routing
bsullivan at lindenlab.com
Wed Oct 22 19:52:52 BST 2008
On Oct 22, 2008, at 10:01 AM, Ben Hood wrote:
> If so, I think we're fine, since my
>> number of consumers will be relatively low. If it's the number of
>> then that becomes a little more troublesome if I want to get clever
>> with my
>> routing keys to help distribute the consumption load across nodes.
> When you say "number of topics", do you mean:
> 1. The number of topic exhanges
> 2. The number of bindings attached to a single topic exchange
> The former would not be a problem, because this would represent
> natural application partitioning.
> The latter is what I think you mean, and is, as indicated above, what
> the O(n) cost is based on for a topic exchnage, because wildcards
> force a linear scan.
I mean 3) number of actual topic keys that I publish on - if I need to
add some variables to the keys so I can distribute load across
multiple queues ("mytopic.1", "mytopic.2"). Some ideas I had here
were a little funky and might cause a multiplying of actual topic key
strings that I use. One idea was to use the publisher's hostname in
the topic key (ex: "mytopic.host123") so that I could create a binding
to "mytopic.host*3" to get ~1/10th the load on each queue (however now
that I think about it, I don't know if I can do that with the
wildcards anyways - I think * matches only full words in the key,
Regardless, as long as a binding to "mytopic.*" counts as one binding
in your O(n), even if I have M topics (mytopic.1, ... mytopic.m), then
I think I'm good with whatever oddball scheme I come up with.
More information about the rabbitmq-discuss