On 11/26/2012 11:20 AM, eugene wrote:
Hello Gordon,

Sorry about the last email, seems like stuff are working now, sort of.
But I think I found another problem, to make sure we are on the same path,
here is my Consumer again:

Queue receiverQ  = session.createQueue("receiverQ; " +
                                "{create:always, auto-delete:true, 
exclusive:true,
node:{x-bindings:[{exchange:'amq.topic', key:'producerQ'}]}}");
MessageConsumer consumer = session.createConsumer(receiverQ);
consumer.setMessageListener(new MyMessageListener());           
while(true){}

The problem is your receiverQ is not being created with auto-delete and exclusive set. This means that the queue is not deleted when you restart the consumer and because your binding are scoped to the node (i.e. match the queues lifecycle) not the link, then both bindings will exist when you have restarted the consumer.

The reason the queue is not auto-deleted is that your address is wrong. The auto-delet and exclusive need to be within the node, and enclosed in a x-declare, much as you do for the producer.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to