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 53CCF847B for ; Wed, 10 Aug 2011 13:54:10 +0000 (UTC) Received: (qmail 63343 invoked by uid 500); 10 Aug 2011 13:54:10 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 63320 invoked by uid 500); 10 Aug 2011 13:54:09 -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 63312 invoked by uid 99); 10 Aug 2011 13:54:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2011 13:54:09 +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 (nike.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; Wed, 10 Aug 2011 13:54:02 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7ADreWF027329 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Aug 2011 09:53:40 -0400 Received: from [10.3.227.203] (vpn-227-203.phx2.redhat.com [10.3.227.203]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p7ADrdkT018010 for ; Wed, 10 Aug 2011 09:53:40 -0400 Message-ID: <4E428D2D.9080408@redhat.com> Date: Wed, 10 Aug 2011 14:52:45 +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; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Lightning/1.0b1 Thunderbird/3.0.10 MIME-Version: 1.0 To: users@qpid.apache.org Subject: Re: C++ client - Address translation 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.25 X-Virus-Checked: Checked by ClamAV on apache.org On 08/10/2011 02:41 PM, Tomas.Soltys@deutsche-boerse.com wrote: > Hi all, > > I have a following problem when witing a qpid client in C++ > > I am trying to setup a receiver on this address: > "response/response.hey_Joe; { create: never, link: { name: > 'response.hey_Joe', durable: false, x-declare: { auto-delete: true, > exclusive: true, arguments: { 'qpid.max_count': 1000, 'qpid.max_size': > 1000000, 'qpid.policy_type': ring } }, x-bindings: [ { exchange: > 'response', key: 'response.hey_Joe' } ] } }" > > If using client written in python addres is translated correctly, but in > C++ client the first slash '/' is replaced with underscore '_'. > > So instead of "response/response.hey_Joe" my C++ client contacts broker > and tries to declare queue with folowing name "response_response.hey_Joe" > > Can someone explain me why my C++ and Python clients are behaving > differently? Am I missing something? The difference is in how the two clients construct the name for the subscription queue that is bound into the response exchange. The python client uses the name option in the link on its own; the c++ client appends that name to the name of the exchange, separated by an underscore. (The fact that your subject and name here are the same is a co-incidence, they need not be and the queue name follows the name option not the subject). The primary purpose of the name option was in identifying a link so that you could reconnect and resubscribe to the same queue. I.e. to allow for links that logically at least survived a loss of connection. I mention this only because by specifying auto-delete, the queue will be deleted when the connection is lost, so will be recreated every time. The clients should behave the same way though for consistency. I'd be happy to fix that if you want to raise a JIRA. Also might be worth pointing out that the x-bindings element you have there is actually redundant. The presence of the subject will automatically create the same binding. --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:users-subscribe@qpid.apache.org