qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fraser Adams <fraser.ad...@blueyonder.co.uk>
Subject Re: Bindings in address string not recreated after dynamically unbinding.
Date Fri, 09 Dec 2011 14:32:58 GMT
Ahhh thanks Alan,
To be honest I've never really figured out what the difference is 
between node and link blocks in address strings.

Is there a good explanation anywhere about the distinction between nodes 
and links. Most of the info on address strings is in the Programming in 
Apache Qpid book, but this is rather sketchy about the whys and 
wherefores of nodes and links.


Alan Conway wrote:
> 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