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

Bug 1064937

Summary: x-declare options auto-delete and exclusive to be ignored for topic subscriptions
Product: Red Hat Enterprise MRG Reporter: Pavel Moravec <pmoravec>
Component: python-qpidAssignee: messaging-bugs <messaging-bugs>
Status: CLOSED NOTABUG QA Contact: MRG Quality Engineering <mrgqe-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 3.0CC: gsim
Target Milestone: ---Keywords: Patch, TestCaseProvided
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-17 07:28:30 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:
Attachments:
Description Flags
Trivial patch none

Description Pavel Moravec 2014-02-13 15:21:12 UTC
Description of problem:
Creating a topic subscription with x-declare:{'auto-delete':False, 'exclusive':False} in Python client sets the auxiliary queue as NON-auto-delete and NON-exclusive.

This differs from C++ as well as Java client and is IMHO wrong: the auxiliary queue has to be auto-delete and exclusive every time and the two x-declare options should be ignored.


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


How reproducible:
100%


Steps to Reproduce:
python qpid-receive -a "amq.direct/#; {link: {x-declare:{'auto-delete':False, 'exclusive':False}}}" -m 1 --print-content=no -f &
python qpid-receive -a "amq.direct/#; {link: {x-declare:{'auto-delete':False}}}" -m 1 --print-content=no -f &
python qpid-receive -a "amq.direct/#; {link: {x-declare:{'exclusive':False}}}" -m 1 --print-content=no -f &
qpid-stat -q


Actual results:
qpid-stat -q shows one queue with no autoDel or excl, one with no autoDel and one with no excl flags. (plus one queue with both flags set - that is the queue for qpid-stat itself).


Expected results:
All queues to have both autoDel and excl flags set.


Additional info:

Comment 1 Pavel Moravec 2014-02-13 15:24:04 UTC
Created attachment 862842 [details]
Trivial patch

Remove "auto-delete" and "exclusive" keys from declare dictionary when creating the queue for topic subscription.

Also, it makes sense to simplify:

auto_delete=(reliability == "unreliable")

to:

auto_delete=True

as it must be set everytime (and already is, see how is reliability set few lines above).

Comment 2 Gordon Sim 2014-02-13 15:58:18 UTC
My concern is that changing this breaks backward compatibility, which I'm not convinced is worth it.

Comment 3 Pavel Moravec 2014-02-14 06:50:41 UTC
(In reply to Gordon Sim from comment #2)
> My concern is that changing this breaks backward compatibility, which I'm
> not convinced is worth it.

C++ and Java clients ignore the flags, while Python client does not. That was my concern of raising the BZ, to unify clients behaviour.

Is there a scenario when it makes sense to suppress auto-delete or exclusive flags (just) in Python client for topic subscription?

Comment 4 Gordon Sim 2014-02-14 18:07:37 UTC
(In reply to Pavel Moravec from comment #3)
> C++ and Java clients ignore the flags, while Python client does not. That
> was my concern of raising the BZ, to unify clients behaviour.

Understood, and that is a good thing in general. However if an application currently is relying on setting them explicitly in python, taking that ability away would break their system.

Also, I'm pretty sure the c++ client doesn't ignore the exclusive flag. It does ignore the auto-delete flag at present, inferring the value based on durability or reliability of the link. But perhaps the better fix is to change the c++ client (and java) to recognise these flags if explicitly specified.

> Is there a scenario when it makes sense to suppress auto-delete or exclusive
> flags (just) in Python client for topic subscription?

Comment 5 Pavel Moravec 2014-02-17 07:28:30 UTC
(In reply to Gordon Sim from comment #4)
> (In reply to Pavel Moravec from comment #3)
> > C++ and Java clients ignore the flags, while Python client does not. That
> > was my concern of raising the BZ, to unify clients behaviour.
> 
> Understood, and that is a good thing in general. However if an application
> currently is relying on setting them explicitly in python, taking that
> ability away would break their system.
> 
> Also, I'm pretty sure the c++ client doesn't ignore the exclusive flag. It
> does ignore the auto-delete flag at present, inferring the value based on
> durability or reliability of the link. But perhaps the better fix is to
> change the c++ client (and java) to recognise these flags if explicitly
> specified.
> 

It makes sense to have the ability in Java and C++ clients, indeed. So I will raise BZs for that.

P.S.: Currently, C++ client ignores auto-delete flag, while Java client ignores both flags.

Comment 6 Pavel Moravec 2014-02-17 07:33:41 UTC
*** Bug 1063323 has been marked as a duplicate of this bug. ***