[rabbitmq-discuss] Regex exchange? (was: Binding to topic exchange with a negation wildcard)
simon at rabbitmq.com
Thu Sep 13 16:20:38 BST 2012
On 13/09/12 15:53, Laing, Michael P. wrote:
> We would find a regular expression matching option for topic exchanges
> most useful.
> My 2 cents:)
Well, there's a reason AMQP didn't just specify regexs for topic
exchanges in the first place - it won't go anything like as fast when
you have a reasonable number of bindings.
Basically, the topic globbing in AMQP is simple enough that we don't
have to look at every binding for every message (and yes, this really
does make a huge difference!):
If we were to have a regex exchange, we'd have to check every binding
against every published message. There's no clever way to do it.
You might not actually care, if your RabbitMQ broker is nowhere near CPU
bound already. And it would be pretty easy to write. So is there general
interest in a regex exchange? (With the proviso that it would be notably
slower than the existing topic exchange...)
More information about the rabbitmq-discuss