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,
Option.AUTO_DELETE);
// Route messages to the new queue if they match the routing
key.
session.exchangeBind(queueName, "amq.topic", routing_key);
// subscribe the listener to the queue
IMessageListener listener = new MessageListener(this, session,
inputQueue);
session.attachMessageListener(listener, queueName);
session.messageSubscribe(queueName);
session.messageFlow(queueName, MessageCreditUnit.MESSAGE, -1);
}
Here is the code for unsubscribe:
_clientSession.close();
_client.close();
--
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:[email protected]