qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: x-bindings misunderstanding
Date Mon, 26 Nov 2012 11:37:21 GMT
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-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org

View raw message