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 AA649E407 for ; Fri, 11 Jan 2013 17:41:12 +0000 (UTC) Received: (qmail 93329 invoked by uid 500); 11 Jan 2013 17:41:12 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 93308 invoked by uid 500); 11 Jan 2013 17:41:12 -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 93294 invoked by uid 99); 11 Jan 2013 17:41:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2013 17:41:12 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of fraser.adams@blueyonder.co.uk designates 81.103.221.48 as permitted sender) Received: from [81.103.221.48] (HELO mtaout02-winn.ispmail.ntl.com) (81.103.221.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2013 17:41:04 +0000 Received: from know-smtpout-1.server.virginmedia.net ([62.254.123.1]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20130111174043.KZHM17200.mtaout02-winn.ispmail.ntl.com@know-smtpout-1.server.virginmedia.net> for ; Fri, 11 Jan 2013 17:40:43 +0000 Received: from [82.33.33.147] (helo=[192.168.1.103]) by know-smtpout-1.server.virginmedia.net with esmtpa (Exim 4.63) (envelope-from ) id 1TtiZp-0004ZZ-Bb for users@qpid.apache.org; Fri, 11 Jan 2013 17:39:33 +0000 Message-ID: <50F04E54.9040506@blueyonder.co.uk> Date: Fri, 11 Jan 2013 17:39:32 +0000 From: Fraser Adams User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: users@qpid.apache.org Subject: Re: Instrumenting the Broker References: <50EFED02.9090903@blueyonder.co.uk> <50F02CAE.10800@blueyonder.co.uk> <6D07C185-D0E1-4C66-B749-064B30DC3AAD@redhat.com> In-Reply-To: <6D07C185-D0E1-4C66-B749-064B30DC3AAD@redhat.com> Content-Type: multipart/alternative; boundary="------------090904060506080406090707" X-Cloudmark-Analysis: v=1.1 cv=AUhbpHVS+xhHrj9wLCYAQoYnFLYUZdbP8UM0GmH2jwk= c=1 sm=0 a=uBsBa1gr-CYA:10 a=3NElcqgl2aoA:10 a=yPCof4ZbAAAA:8 a=kADh0RtOOIu0m3hB_38A:9 a=pILNOxqGKmIA:10 a=18HwjcyijI8A:10 a=3aA2ligPn3sA:10 a=Wbd5pRgs0c0A:10 a=OPdnvjKujG7Pd4M_:21 a=R03_Kw6-Qx2K2JoR:21 a=20KFwNOVAAAA:8 a=H72P5reN6Op5sVOlLGYA:9 a=_W_S_7VecoQA:10 a=jEp0ucaQiEUA:10 a=Xml1ZVI5PF_41rgi:21 a=W398-ydL1GqkAhSB:21 a=PDUiTyJAiTtpLDFX:21 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 X-Virus-Checked: Checked by ClamAV on apache.org --------------090904060506080406090707 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit > Yes, with AMQP 0-10, the only time a producer indicates the destination of the message is when it actually sends the message. The message.transfer command includes the destination of the message, which is an exchange. A producer may send to various exchanges, simply by changing the destination in the message.transfer command with each message. As a result, from the broker's perspective, there's not really any way to look at a producer client and determine which exchange(s) it's sending to. > Thanks Andy that kind of makes sense. I think that part of the confusion might stem from some of the higher level APIs, I've only really used JMS and qpid::messaging (I've steered well clear of qpid::client as recommended by Gordon and several others and I know plenty of people who've been bitten by qpid::client which makes me glad I did :-)). So for qpid::messaging and JMS the model tends to be that one creates a connection, then one creates a session and in general in qpid::messaging one would create Senders specifying an address and in JMS similarly one would create a MessageProducer. So I guess that it's fairly easy to *assume* that the address (which in the case of a producer could just be the exchange name for something like amq.match) is associated with the Connection/Session. if you normally do: connection.open(); Session session = connection.createSession(); Sender sender = session.createSender("amq.match"); ........ sender.send(message); ......... it's easy to fall into that trap. I guess that the alternate send which actually takes an address (e.g. the JMS MessageProducer |*send *(Destination destination, Message message)| ) is a closer analogue to the underlying AMQP message.transfer I guess that the higher level abstraction just acts as a cache for the real AMQP destinations. Thanks again Andy I think that your explanation has helped clarify in my mind the transient association between Connection and Exchange even though I suspect in practice the vast majority of producer code is likely to be written in a way that retains what looks like a more sustained association, but that's only in the client runtime not in the broker. Frase. --------------090904060506080406090707--