[rabbitmq-discuss] configuring an header exchange binding in rabbitmq.cfg

Matthew Sackman matthew at rabbitmq.com
Thu Nov 10 17:31:26 GMT 2011


Hi Tom,

On Thu, Nov 10, 2011 at 07:23:19AM -0800, Tom Cellucci wrote:
> I am trying to configure a header exchange and some shovels using
> 'rabbitmq.cfg'.  In the shovel configuration, I declare a header
> exchange, a queue for the shovel, and would like to add a binding rule
> so that messages with a given header are routed into the shovel queue.
> How can I declare the binding rule for exchange->queue for a given
> header value?  It's trivial to do through the web admin, but seemingly
> impossible through the rabbitmq.cfg.  I've tried many variations
> without success, and searched all over the web without finding an
> example. Please advise.

Which version of RabbitMQ are you using? "rabbitmq.cfg" isn't a file
name that I recognise - I think you mean "rabbitmq.config", and indeed
that's the file name that the shovel README talks about:
http://hg.rabbitmq.com/rabbitmq-shovel/file/b9f4e6dc4fa3/README

The bind will look something like:

{'queue.bind',
       [{exchange, <<"my_exchange">>},
        {queue,    <<"my_queue">>},
        {arguments, [{"x-match",         longstr, "any"},
                     {"headerName",      longstr, "headerValue"},
                     {"otherHeaderName", longstr, "otherHeaderValue"}]}]}

I think.

Matthew


More information about the rabbitmq-discuss mailing list