Return-Path: Delivered-To: apmail-qpid-users-archive@www.apache.org Received: (qmail 31431 invoked from network); 19 Nov 2010 15:45:23 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Nov 2010 15:45:23 -0000 Received: (qmail 65077 invoked by uid 500); 19 Nov 2010 15:45:55 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 64931 invoked by uid 500); 19 Nov 2010 15:45:54 -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 64922 invoked by uid 99); 19 Nov 2010 15:45:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Nov 2010 15:45:54 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=10.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; Fri, 19 Nov 2010 15:45:46 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAJFjPaq019919 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 19 Nov 2010 10:45:25 -0500 Received: from [10.3.230.67] (vpn-230-67.phx2.redhat.com [10.3.230.67]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oAJFjOL1025797 for ; Fri, 19 Nov 2010 10:45:24 -0500 Message-ID: <4CE69B29.3090200@redhat.com> Date: Fri, 19 Nov 2010 15:43:37 +0000 From: Gordon Sim Organization: Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom.,Registered in England and Wales under Company Registration No. 3798903,Directors: Michael Cunningham (USA), Charlie Peters (USA) and David Owens (Ireland) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc11 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: users@qpid.apache.org Subject: Re: cannot auto-delete exchange using the messaging API References: <290B26C9-C2E3-41CB-AAC5-E06A4797EE62@3crowd.com> In-Reply-To: <290B26C9-C2E3-41CB-AAC5-E06A4797EE62@3crowd.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Virus-Checked: Checked by ClamAV on apache.org On 11/19/2010 12:22 AM, David Hawthorne wrote: > I'm trying to use the messaging API, and I want the exchanges and queues created by my client and server software to be removed from the qpid server once all clients using them have exited/disconnected. The problem is that the queues *are* being destroyed, but the exchanges are *not*, and there is 1 response-queue exchange per each response-queue queue. I've confirmed that the queue bound to the exchange has been destroyed, and the binding has been destroyed as well. This is using the .6 API. > > I've tried: > > qpid::messaging::Address reply_to_address("#response-queue; {create:always, delete:always, node-properties:{type:topic, x-properties: {auto-delete:true}}}"); > qpid::messaging::Receiver receiver = session.createReceiver(reply_to_address); Do you really want the reply_to_address to be a topic? Will any other receiver subscribe to that? If so how do they get the correct name since it is a uniquely generated one? If not, why not just use a response queue. > I ran the client program 3 times and this is the information I see about the exchanges created using qpid-tool afterwards: > > qpid: list exchange > Objects of type org.apache.qpid.broker:exchange > ... > 111 23:41:33 - 103.84fc9811-81c1-4d4a-8886-18417da94d4c#response-queue > 112 23:44:51 - 103.2b8db04b-3308-4d08-bec6-54ae64514d16#response-queue > 142 23:55:59 - 103.ea74e839-9ea0-4030-820c-9aca0848f924#response-queue > > The important bit to note here is that autoDelete is False when I want it to be true: The c++ broker does not yet support auto-deleted exchanges. However, the delete:always should cause the reciever/sender to delete it when it closes (I've verified that with the latest code). That of course is not always what you want where you have multiple senders/receivers. > qpid: show exchange 111 > Object of type org.apache.qpid.broker:exchange: (last sample time: 23:44:00) > Type Element 111 > =================================================================================== > property vhostRef 103 > property name 84fc9811-81c1-4d4a-8886-18417da94d4c#response-queue > property type topic > property durable False > property autoDelete False > > qpid: show exchange 142 > Object of type org.apache.qpid.broker:exchange: (last sample time: 00:03:30) > Type Element 142 > =================================================================================== > property vhostRef 103 > property name ea74e839-9ea0-4030-820c-9aca0848f924#response-queue > property type topic > property durable False > property autoDelete False > > The queues have been deleted properly, though: > > qpid: list queue > Objects of type org.apache.qpid.broker:queue > ID Created Destroyed Index > ======================================================================================================================== > ... > 143 23:55:59 00:03:26 103.ea74e839-9ea0-4030-820c-9aca0848f924#response-queue_5d00496a-d540-49d9-be28-01d6a145206c > > qpid: show queue 143 > Object of type org.apache.qpid.broker:queue: (last sample time: 00:03:30) > Type Element 143 > ============================================================================================================================ > property vhostRef 103 > property name ea74e839-9ea0-4030-820c-9aca0848f924#response-queue_5d00496a-d540-49d9-be28-01d6a145206c > property durable False > property autoDelete True > > > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:users-subscribe@qpid.apache.org > --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:users-subscribe@qpid.apache.org