[rabbitmq-discuss] Topic routing
0x6e6562 at gmail.com
Mon Oct 20 11:32:20 BST 2008
I am taking you up on your offer to turn this into a list topic :-)
On Thu, Oct 16, 2008 at 6:06 PM, Brian Sullivan <bsullivan at lindenlab.com> wrote:
> Yes, we're using topic exchanges, since we want to be able to publish
> messages from multiple domains - I've been prepending the domain to the
> topic name. In this case, if I want to
> track someone logging in, my topic is "productiongrid.login". If I want to
> subscribe across ALL logins for some reason, I can subscribe to "*.login".
> Does that make sense?
Do you mean that you are sending messages to the default topic
exchange with the routing key productiongrid.login or do you have a
topic exchange called productiongrid.login?
> I guess I *could* create an exchange for each grid, but that seems to be a
> less scalable solution, and it's harder to subscribe to "all" of them.
I don't think I understand your domain enough to judge this (a diagram
always helps :-).
Topic exchanges are very simple way to do hierarchial routing because
consumers can filter out portions of a routing key that they are not
However, in the current architecture, direct bindings are more
efficient than topic bindings because they can exploit an index that
So I think that the scalablility sweet spot between topic exchanges
and direct exchanges will depend on the semantics of your application
and the abstractions that you want to employ.
> Either way, if the broker has no bindings to a key, it should be able to
> just drop it, correct?
Yes, if it can't route a message, it just turfs it (if it's quick
enough to drain the pipeline ;-)
> I am not clear why it would be so slow in this case.
> I just ran some other tests this morning - I think the scenario I described
> below (sudden drop in performance) is when I start using swap. Any
It is always helpful to have a stripped down test that can help us
reproduce the issues that you are experiencing with your own code.
That combined with an understanding of what you are trying to acheive
will allow us to come up with a solution for your problem.
More information about the rabbitmq-discuss