Return-Path: X-Original-To: apmail-qpid-users-archive@www.apache.org Delivered-To: apmail-qpid-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 830F59B79 for ; Fri, 5 Oct 2012 06:49:13 +0000 (UTC) Received: (qmail 77551 invoked by uid 500); 5 Oct 2012 06:49:13 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 77161 invoked by uid 500); 5 Oct 2012 06:49:07 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 77119 invoked by uid 99); 5 Oct 2012 06:49:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2012 06:49:05 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gsim@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2012 06:48:59 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q956mbN2018797 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 5 Oct 2012 02:48:37 -0400 Received: from [10.36.116.44] (ovpn-116-44.ams2.redhat.com [10.36.116.44]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q956mYNE017614 for ; Fri, 5 Oct 2012 02:48:36 -0400 Message-ID: <506E8371.6060209@redhat.com> Date: Fri, 05 Oct 2012 07:51:29 +0100 From: Gordon Sim Organization: Red Hat UK Ltd, Registered in England and Wales under Company Registration No. 3798903, Directors: Michael Cunningham (USA), Mark Hegarty (Ireland), Matt Parsons (USA), Charlie Peters (USA) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: users@qpid.apache.org Subject: Re: Binding queue to Header exchange with 'any' qualifier References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-Virus-Checked: Checked by ClamAV on apache.org 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 For additional commands, e-mail: users-help@qpid.apache.org