Bug 726686

Summary: link bindings are not removed after the link is closed
Product: Red Hat Enterprise MRG Reporter: Petr Matousek <pematous>
Component: python-qpidAssignee: messaging-bugs <messaging-bugs>
Status: NEW --- QA Contact: Messaging QE <messaging-qe-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0CC: iboverma, jross
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Petr Matousek 2011-07-29 12:45:25 UTC
Description of problem:

The python client does not remove link bindings when the link ends. 

If the x-bindings is specified in the node, they will not be tied to the scope of the link. (The node bindings remain present until removed on demand or the broker is restarted).
- THIS IS CORRECT

If the x-bindings is specified in the link, they will be tied with the link.
All the link bindings shall be removed when the link ends (i.e. sender/receiver closes).
- INCORRECT, the binding is not removed

C++ client behaviour is correct and can be used as model.

Version-Release number of selected component (if applicable):
python-qpid-0.10-1.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. drain "q;{ create: always, node: { type: queue }, link: { x-bindings: [{ exchange: 'amq.direct', queue: 'q', key: 'key' }]}}"
2. qpid-config -b queues
3. the binding is still present, was not removed
  
Actual results:
The link binding is not removed after the link is closed (i.e. sender/receiver closes).

Expected results:
binding is removed after the link is closed.

Additional info:

The behaviour shall meet following criteria:
 
# drain "q;{create: always,node:{type: queue}}"
# spout "ex/key;{ create: always, node: { type: topic }, link: { x-bindings: [{ exchange: 'ex', queue: 'q', key: 'key' }]}}" "msg1"
# qpid-config -b exchanges ex
# spout "ex/key" "msg2"
# drain "q"

The binding is not present, only msg1 was received
(ex - msgIn:2 msgOut:1 msgDrop:1, q - msgIn:1 msgOut:1)

Comment 1 Petr Matousek 2013-09-09 10:20:05 UTC
Still an issue on python-qpid-0.22-4, that forces me to use workarounds while implementing tests for messaging api. => raising mrg-3.0?