[rabbitmq-discuss] Regex exchange? (was: Binding to topic exchange with a negation wildcard)

Laing, Michael P. Michael.Laing at nytimes.com
Thu Sep 13 17:05:53 BST 2012


Interesting! It's more of a "nice-to-have" option for me, much less
important than good performance, reliable federation, etc.

Multiple bindings and sender-selected distribution add richness as well
that mitigate the need.

And we have a scheme for distilling complex combinations of subscriber
roles and topic interests into multiple pairs of symmetric 128 character
strings which, with separating periods, create 255 char keys that are used
for binding 'sieves' and publishing 'patterns' respectively in topic
exchanges.

Seems quite fast. Actually my developers are still scratching their heads
and not actually using it yet - but it's good to get out in front of them
sometimes :)

Plus there's a lot of headroom left in the scheme if we fully exploit the
depth of each character position, so we should be able to stay out front
for awhileŠ

ml

On 9/13/12 11:20 AM, "Simon MacMullen" <simon at rabbitmq.com> wrote:

>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!):
>
>http://www.rabbitmq.com/blog/2010/09/14/very-fast-and-scalable-topic-routi
>ng-part-1/
>http://www.rabbitmq.com/blog/2011/03/28/very-fast-and-scalable-topic-routi
>ng-part-2/
>
>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.
>
>However.
>
>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...)
>
>Cheers, Simon
>
>-- 
>Simon MacMullen
>RabbitMQ, VMware



More information about the rabbitmq-discuss mailing list