[rabbitmq-discuss] Headers Exchange Logic

Tony Garnock-Jones tonyg at lshift.net
Fri Jul 17 15:41:23 BST 2009


Hi Darien,

Darien Kindlund wrote:
> According to the spec (I think), you can supply regex to
> match on particular headers, when binding a queue to an exchange. 

Sadly, it's not even regular expressions. It's either an AND or an OR of
various headers each either existing, or precisely matching the pattern
supplied.

> However, I wondering if it's possible to do something like:
> - Bind 'bar' to 'foo', where header 'VALUE > 20'.  Meaning: evaluate
> this header; if it's not an integer or if the value is <= 20, discard or
> let other applicable queues receive it. Otherwise, accept.

No, not yet.

> I'm pretty sure this type of language isn't supported, but I'd be
> curious if it's something you're considering in the future.

Absolutely -- there's a hugely rich vein of possible exchange behaviours
waiting to be explored. Streaming SQL? Javascript-based message
matching? The sky's the limit :)

Tony
-- 
 [][][] Tony Garnock-Jones     | Mob: +44 (0)7905 974 211
   [][] LShift Ltd             | Tel: +44 (0)20 7729 7060
 []  [] http://www.lshift.net/ | Email: tonyg at lshift.net




More information about the rabbitmq-discuss mailing list