Thanks for this Gordon, I'll try it out. regards Noel
On Fri, Oct 5, 2012 at 4:51 PM, Gordon Sim <[email protected]> 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: > [email protected].**org<[email protected]> > For additional commands, e-mail: [email protected] > >
