Bug 691779 - Using assert in address string leads to binding creation
Summary: Using assert in address string leads to binding creation
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: python-qpid
Version: Development
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: ---
Assignee: messaging-bugs
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-29 13:08 UTC by Petr Matousek
Modified: 2021-03-16 12:46 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)

Description Petr Matousek 2011-03-29 13:08:07 UTC
Description of problem:

Using the following command the binding amq.direct [key] => myQueue is created: 

# drain "amq.direct; {assert: always, node: { type: topic }, link: { x-bindings: [{ exchange: 'amq.direct', queue: myQueue, key: key }]}}"

No object shall be created when assert is used in address string

This was seen on RHEL5.6 x86_64

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

How reproducible:
100%

Steps to Reproduce:
1. Create queue myQueue
2. execute following command
# drain "amq.direct; {assert: always, node: { type: topic }, link: { x-bindings: [{ exchange: 'amq.direct', queue: myQueue, key: key }]}}"
3. list amq.direct exchange binding
4. there is a new binding amq.direct [key] => myQueue
  
Actual results:
The binding is created when assert is used in address string

Expected results:
No object shall be created when assert is used in address string

Additional info:

# drain "myQueue;{create: always,node: {type:queue}}"
# drain "amq.direct; {assert: always, node: { type: topic }, link: { x-bindings: [{ exchange: 'amq.direct', queue: myQueue, key: key }]}}"
# qpid-config -b exchanges amq.direct
Exchange 'amq.direct' (direct)
    bind [key] => myQueue
    ...

Comment 1 Petr Matousek 2012-05-29 10:33:45 UTC
The description in Comment 1 is not precise. The above mentioned reproduction scenario demonstrates, that link binding is created (not sure if it's correct, but c++ clients behaves the same way, see below) but is not removed after the link is closed (already reported as Bug 726686).

When the binding (in step 2. of reproduction scenario) is moved form link to node , the binding is not created (as expected), but no error message appears.
Some error message similar to c++ client (ie. No such binding [exchange=amq.direct, queue=myQueue, key=key]) shall be printed out and the return code shall be non-zero. (this issue shall be covered by Bug 731096).

So the only one question remains: Shall the link binding be created if only "assert" is used in the address string? (node bindings are not created this way). If this will be confirmed as correct behaviour, this bug can be closed as NOTABUG.

-----
in example:

python:
node binding:
# drain "amq.direct; {assert: always, node: { type: topic, x-bindings: [{ exchange: 'amq.direct', queue: myQueue, key: key }]}}"
-> binding is not created, (no message is printed out, return code 0 [Bug 731096])

link binding:
# drain "amq.direct; {assert: always, node: { type: topic }, link: { x-bindings: [{ exchange: 'amq.direct', queue: myQueue, key: key }]}}"
-> binding is created (not removed after the link is closed [Bug 731096])


c++: 
node binding:
# drain "amq.direct; {assert: always, node: { type: topic, x-bindings: [{ exchange: 'amq.direct', queue: myQueue, key: key }]}}"
-> binding is not created, (error message displayed: [exchange=amq.direct, queue=myQueue, key=key])

link binding:
# drain "amq.direct; {assert: always, node: { type: topic }, link: { x-bindings: [{ exchange: 'amq.direct', queue: myQueue, key: key }]}}"
-> link binding is created (and correctly removed after the link is closed)


Note You need to log in before you can comment on or make changes to this bug.