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 2945811296 for ; Fri, 6 Jun 2014 08:59:03 +0000 (UTC) Received: (qmail 13269 invoked by uid 500); 6 Jun 2014 08:59:02 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 13228 invoked by uid 500); 6 Jun 2014 08:59:02 -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 13212 invoked by uid 99); 6 Jun 2014 08:59:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jun 2014 08:59:02 +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, 06 Jun 2014 08:58:57 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s568wZ3j017539 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 6 Jun 2014 04:58:35 -0400 Received: from [10.36.116.92] (ovpn-116-92.ams2.redhat.com [10.36.116.92]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s568wYlu032588 for ; Fri, 6 Jun 2014 04:58:34 -0400 Message-ID: <539182B3.3070508@redhat.com> Date: Fri, 06 Jun 2014 09:58:27 +0100 From: Gordon Sim Organization: Red Hat UK Ltd, Registered in England and Wales under Company Registration No. 3798903, Directors: Michael Cunningham (USA), Matt Parsons (USA), Charlie Peters (USA), Michael O'Neill (Ireland) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: users@qpid.apache.org Subject: Re: Subject Filtering with Queues References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Virus-Checked: Checked by ClamAV on apache.org On 06/05/2014 11:27 PM, Chris Wj wrote: > It seems that subject filtering with queues is not working in the current > qpid implementations. What is the recommended way to simulate this > behavior? I am used to AMQP 0.9.1 and I am very unfamiliar with creating > such filtering behavior with QPID. I would like to programmatically > establish queues and set it up so that receivers can specify a key/subject > that matches messages. I'm primarily using Python and would like to keep > things as cross platform as possible. With the qpid.messaging API (which I assume is what you are using?), you can specify an address for your receiver in the form / and the library will create a queue for you and bind it to the specified exchange with the specified key. So e.g. creating a receiver for 'amq.topic/abc' will then receive messages sent to amq.topic with the routing key being abc. If you want you can control the 'subscription queue' created in more detail by specifying some link options. E.g. 'amq.topic/abc; {link:{name:my-queue}}' would mean the queue was given the name my-queue. Further you can specify details of the declare used to create the queue if needed. E.g. 'amq.topic/abc; {link:{name:my-queue, x-declare:{auto-delete:False, durable:True}}}' In these examples, the filtering is applied to messages coming through the exchange, before they are enqueued. If on the other hand you use an address where the 'node' is a queue, i.e. /, then for receivers the key will not have any effect with the current qpid.messaging. That pattern implies filtering by subject on the messages after the have been enqueued. [It is now supported by the c++ qpid::messaging (when used with qpidd, the c++ broker), but not by the python qpid.messaging equivalent.] --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org