qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Conway <acon...@redhat.com>
Subject Re: Bindings in address string not recreated after dynamically unbinding.
Date Fri, 09 Dec 2011 14:15:36 GMT
On 12/09/2011 08:57 AM, Fraser Adams wrote:
> Hi
> I've noticed some slightly weird behaviour with respect to bindings.
> I've got a Java test consumer client with an address string in JNDI as follows
> destination.subscribedAddress1 = test; {create: always, node: {x-bindings:
> [{exchange: 'amq.direct', queue: 'test', key: 'test'}]}}
> So nothing special so far.
> I've got some QMF2 code I'm working on that dynamically unbinds when the queue
> threshold is exceeded.
> That works OK and removes the binding fine.
> But what's weird (to me at any rate) is that if I re-run my consumer with the
> address above I'd have expected the binding to get recreated, but it doesn't!!
> I can re-add the binding using qpid-config and also via the QMF create method,
> just not from the address string.
> If I remove the queue and try again everything gets re-created as expected.
> This seems like a subtle little bug to me, or have I discovered some quirky
> "expected behaviour" :-)

You have specified the binding as a node: property in your address. That means 
the bindings are done if/when the node (in this case queue) is created. Hence if 
the queue is already there nothing  happens. You can also specify the binding as 
a link: property. That will get re-created every time you connect to the address.

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

View raw message