qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From res <axf...@gmail.com>
Subject C# queue autodelete problem
Date Tue, 15 Sep 2009 23:15:47 GMT

Hi All,
I'm having some trouble with queue auto-delete in the C# client. I have
created a queue with Option.AUTO_DELETE set, but when my client terminates
it doesn't delete the queue within the broker. Has anyone else run in to
this? Doing basically the same thing in C++ works fine.

My code looks like this:

Here is the code for subscription:
       _client.connect(host, port, "test", "guest", "guest");
       _clientSession = _client.createSession(50000);
       prepareQueue(qpidQueue, routingKey, _clientSession, inputQueue);

       private void prepareQueue(string queue, string routing_key,
ClientSession session , InputQueue inputQueue)
            // Create a unique queue name for this consumer by concatenating
            // the queue name parameter with the Session ID.  
            string queueName = queue + ":" + CustomRegistrationID;
            session.queueDeclare(queueName, Option.EXCLUSIVE,

            // Route messages to the new queue if they match the routing
            session.exchangeBind(queueName, "amq.topic", routing_key);

            // subscribe the listener to the queue
            IMessageListener listener = new MessageListener(this, session,
            session.attachMessageListener(listener, queueName);
            session.messageFlow(queueName, MessageCreditUnit.MESSAGE, -1);

Here is the code for unsubscribe: 

View this message in context: http://n2.nabble.com/C-queue-autodelete-problem-tp3652616p3652616.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org

View raw message