qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noel OConnor <noel.ocon...@gmail.com>
Subject Re: Binding queue to Header exchange with 'any' qualifier
Date Tue, 09 Oct 2012 01:04:19 GMT
Thanks for this Gordon, I'll try it out.

regards
Noel

On Fri, Oct 5, 2012 at 4:51 PM, Gordon Sim <gsim@redhat.com> wrote:

> 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
>> STATUSPROP=ONLINEACTIVITY STATUSPROP=CAMPAIGNRESPONSE
>>
>
> 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.
>
> E.g.
>
> 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;
> $STATUS_PROP = 'ONLINEACTIVITY' or $STATUS_PROP = 'CAMPAIGNRESPONSE'
>
> Then:
>
> 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<users-unsubscribe@qpid.apache.org>
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message