[rabbitmq-discuss] Binding to topic exchange with a negation wildcard
matthias at rabbitmq.com
Thu Sep 13 22:18:55 BST 2012
On 13/09/12 21:47, Dave Curylo wrote:
> The fanout + alternate-exchange for junk works, except I can't make
> these extra exchanges exclusive like I can when declaring a server
> assigned, exclusive, autodelete queue with queueDeclare(). That's
> probably not a big deal, as nobody would likely guess the names of these
> extra exchanges.
If you make the names cryptographically strong names then nobody can
> I think I'd take a simple negation binding over a full regex if there
> are performance implications. [...] It doesn't seem like with these
> types of negations would have performance implications.
Firstly, the semantics of multiple bindings with the same destination is
that of disjunction - the message is routed to the destination if it
matches one or more of the bindings. By contrast, what you seem to want
is a conjunction of negations. Or, equivalently, a negated disjunction.
I suppose the later could be expressed as a single binding, using
binding parameters to hold all the constituent parts, but it would be
far from natural.
Secondly, we don't store bindings in a list. There is a fairly
sophisticated data structure and algorithm underpinning the topic
I am pretty sure negation doesn't fit in there and indeed I wouldn't be
surprised to discover that introducing negation results in a theoretical
matching complexity of O(binding_count).
More information about the rabbitmq-discuss