qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Binding queue to Header exchange with 'any' qualifier
Date Fri, 05 Oct 2012 06:51:29 GMT
On 10/04/2012 07:58 AM, Noel OConnor wrote:
> Hi,
> I'm using MRG-M 2.2 and I'm trying to configure a header exchange to use
> the any qualifier
> I have setup a header exchange and a queue and I'm trying to bind it using
> the command
> /usr/bin/qpid-config bind test_hdr_exchange noctestQ BK3 any

Unfortunately that is not a valid binding. The match arguments are 
passed in an AMQP 'map', and they are defined not to have multiple 
entries per key.

So in this case, the only match that is sent to the broker is 
STATUSPROP=CAMPAIGNRESPONSE, whicheffectively overwrites the previous 
value for that key.

You could try the 'XML' exchange - you don't need to use XML in your 
messages, you can simply use it as a way of specifying xquery based 
matching criteria on the headers.


qpid-config add exchange xml xml_exchange
qpid-config add queue queue
qpid-config bind xml_exchange queue -f xquery.example

where the file xquery.example contains e.g:

declare variable $STATUS_PROP as xs:string external;


spout -P STATUS_PROP=CAMPAIGNRESPONSE xml_exchange 'this should match'
spout -P STATUS_PROP=ONLINEACTIVITY xml_exchange 'as should this'
spout -P STATUS_PROP=RANDOMGARBAGE xml_exchange 'this should not match'

To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org

View raw message