qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Hawthorne <dha...@3crowd.com>
Subject cannot auto-delete exchange using the messaging API
Date Fri, 19 Nov 2010 00:22:42 GMT
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);


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:

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


Mime
View raw message