On 06/22/2011 07:21 AM, Zhemzhitsky Sergey wrote:
Hi there,

I'm trying to investigate headers exchange type.
By means of qpid-config tool I was able to create a binding using the following 
command:

qpid-config bind myExchange.headers myQueue bindingKey any header1=header1Val, 
header2=header2Val

If not to specify bindingKey an error occurs.

I'm wondering why do I need to specify binding key for exchange of type 
"headers"?

That's a result of the tool using positional arguments and not being clever enough to detect that the binding key was not specified.

You can have a null binding key by using e.g.

qpid-config bind myExchange.headers myQueue '' any header1=header1Val, header2=header2Val

The binding key for the headers exchange is used only for identity. You need it when unbinding and it must be unique for a given exchange and queue pairing. Null is valid value, but the uniqueness still applies so you can't have more than one binding between the same queue and exchange with a null binding key.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to