[rabbitmq-discuss] Headers Exchange Logic

Ben Hood 0x6e6562 at gmail.com
Fri Jul 17 15:30:23 BST 2009


On Fri, Jul 17, 2009 at 2:31 PM, Darien Kindlund<darien at kindlund.com> wrote:
> I just have a general question about the headers exchange
> implementation in RabbitMQ.  According to the spec (I think), you can
> supply regex to match on particular headers, when binding a queue to
> an exchange.  However, I wondering if it's possible to do something
> like:
> - Declare exchange 'foo'
> - Declare queue 'bar'
> - 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.
> 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.

This is basically the JMS selector semantics, which IIRC are generally
implemented in the client  as opposed to the broker (I think that MQ
Series version 7 has some kind of server side support for this, but I
haven't used it myself).

We did look at this briefly, but decided to shelve this feature
because it is very difficult to implement on the broker side because
of the multi-dimensional indexes you'd have to maintain.

Having said that, maybe implementing it on the broker side is perhaps
being a bit too fancy - maybe you can just trade off network bandwidth
for broker side query complexity.

Having said this though, you'd probably want a way to reject messages
without having to nuke the channel.



More information about the rabbitmq-discuss mailing list