qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: qpid-config: create a binding for a headers exchange
Date Wed, 22 Jun 2011 08:50:38 GMT
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:users-subscribe@qpid.apache.org


Mime
View raw message