Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 920706

Summary: QMF attempt to create already existing binding should raise an error
Product: Red Hat Enterprise MRG Reporter: Pavel Moravec <pmoravec>
Component: qpid-qmfAssignee: messaging-bugs <messaging-bugs>
Status: CLOSED UPSTREAM QA Contact: Messaging QE <messaging-qe-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.3CC: jross, pematous
Target Milestone: 3.2Keywords: Improvement, Patch, TestCaseProvided
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-10 03:27:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 916953    
Bug Blocks:    
Attachments:
Description Flags
patch proposal none

Description Pavel Moravec 2013-03-12 15:14:41 UTC
Description of problem:
When creating (via QMF) a binding such that the tripple (exchange, bindingKey, queue) already exists for another binding, this new create attempt should fail and QMF should warn the binding has not been created (or even updated). This is a valid request for any exchange type.


Version-Release number of selected component (if applicable):
MRG 2.3


How reproducible:
100%


Steps to Reproduce:
qpid-config add queue MyQueue
qpid-config bind amq.fanout MyQueue
qpid-config bind amq.fanout MyQueue 
echo $?
qpid-config bind amq.direct MyQueue SomeKey
qpid-config bind amq.direct MyQueue SomeKey
echo $?
qpid-config bind amq.topic MyQueue SomeKey
qpid-config bind amq.topic MyQueue SomeKey
echo $?
qpid-config bind amq.topic MyQueue Some.Key
qpid-config bind amq.topic MyQueue Some.Key
echo $?
qpid-config bind amq.topic MyQueue Some.#.Key
qpid-config bind amq.topic MyQueue Some.#.Key
echo $?
qpid-config bind amq.match MyQueue SomeKey any property1=value1
qpid-config bind amq.match MyQueue SomeKey all property1=value1
echo $?
qpid-config bind amq.match MyQueue SomeKey all property1=value1
echo $?
qpid-config add exchange xml amq.xml
echo "declare variable \$headerKey external; \$headerKey = 1" > xquery1.xq
echo "declare variable \$headerKey external; \$headerKey = 2" > xquery2.xq
qpid-config bind amq.xml MyQueue SomeKey -f xquery1.xq
qpid-config bind amq.xml MyQueue SomeKey -f xquery2.xq
echo $?

  
Actual results:
All $? returns 0


Expected results:
All $? to return 1


Additional info:

Comment 1 Pavel Moravec 2014-03-11 11:01:18 UTC
Created attachment 873056 [details]
patch proposal

If queue->bind(..) method returns false (in fact exchange->bind(..) does so) and the bind request was not federation originated, raise exception.

BUT this will cause second instance of below command to fail:

qpid-receive -a "MyQueue; {create:always, node:{ x-bindings: [{ exchange:'amq.fanout', queue:'MyQueue' }] }}"

While it makes sense to re-use the address string..

/me was thinking about raising WARN message there rather.

Comment 4 Red Hat Bugzilla 2025-02-10 03:27:34 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.