[rabbitmq-discuss] topix

Martin Sustrik sustrik at 250bpm.com
Mon Feb 22 11:46:33 GMT 2010


Hi David,

 > One thing that would help us to make these decisions as to the best 
approach would
 > be some feedback on how people are using topic exchanges in the real 
world: e.g.
 > if it turns out that basically all bindings are short then the space 
explosion isn't really an issue. If bindings are created rarely, or 
typically in big blocks,
 > then we could optimise for that. There's not going to be a 
universally "best" solution, so while the objective is of course to make 
everything as fast as possible
 > it always helps to know which operations we need to worry about the most.
 > Hope that helps clarify some of our thoughts so far.

Very often the only subsciption type needed is subsciption for a 
specific sub-tree within the topic hierarchy, in other words 
subscription with literal prefix and # at the end, e.g. "x.y.z.#".

If that's the case, all three fundamental operations can be implemented 
in O(1) time where n is number of topics and/or bindings and O(n) time 
where n is length of the longest subscription.

Such an algorithm can be turned on by a specific hint passed to 
Exchange.Create 'arguments' parameter, or, more transparently, it can be 
used as long as subscriptions adhere to "x.y.z.#" pattern and once 
there's a non-compliant subscription, matching algorithm can switch 
dynamically to a more generic one.

Martin




More information about the rabbitmq-discuss mailing list