Bug 1065872 - Topic subscriptions should not ignore auto-delete x-declare flag
Summary: Topic subscriptions should not ignore auto-delete x-declare flag
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 3.0
Hardware: All
OS: All
low
low
Target Milestone: 3.1
: ---
Assignee: Pavel Moravec
QA Contact: Eric Sammons
URL: https://bugzilla.redhat.com/show_bug....
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-17 07:38 UTC by Pavel Moravec
Modified: 2015-04-14 13:47 UTC (History)
3 users (show)

Fixed In Version: qpid-cpp-0.30-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-14 13:47:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Apache JIRA QPID-5597 0 None None None Never
Red Hat Product Errata RHEA-2015:0805 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging 3.1 Release 2015-04-14 17:45:54 UTC

Description Pavel Moravec 2014-02-17 07:38:38 UTC
Description of problem:
Per https://bugzilla.redhat.com/show_bug.cgi?id=1064937#c5, C++ client should take into account auto-delete x-declare option when declaring topic subscription.


Version-Release number of selected component (if applicable):
qpid-cpp-client-0.22-35.el6.x86_64


How reproducible:
100%


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


Actual results:
  queue                                            dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
  ================================================================================================================================
  amq.direct_19c89381-ace4-4871-85d6-c87f4462999a       Y        Y        0     0      0       0      0        0         1     2

(see the auxiliary subscription queue is auto-delete, despite we set it otherwise)


Expected results:
(non-auto-delete queue created)


Additional info:

Comment 1 Pavel Moravec 2014-03-04 14:52:31 UTC
Committed revision 1574119.

Comment 3 Valiantsina Hubeika 2014-10-20 15:41:36 UTC
On 64b architecture the issue can be verified, but on the 32b arch. the issue is still present:

1. qpid-receive -a "amq.direct/#; {link: {x-declare:{'auto-delete':False}}}" -m 1 -f
2. qpid-stat -q | egrep '(queue|=|direct)'
  queue                                            dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
  ================================================================================================================================
  amq.direct_bad38732-af89-480e-bf7a-ae953e53db27                Y        0     0      0       0      0        0         1     2

3. ./qpid-send -a "amq.direct/#" -m 1

4. qpid-stat -q | egrep '(queue|=|direct)'
  queue                                     dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
  =========================================================================================================================
# empty

Comment 4 Pavel Moravec 2014-10-22 06:01:28 UTC
(In reply to vhubeika from comment #3)
> On 64b architecture the issue can be verified, but on the 32b arch. the
> issue is still present:
> 
> 1. qpid-receive -a "amq.direct/#; {link: {x-declare:{'auto-delete':False}}}"
> -m 1 -f
> 2. qpid-stat -q | egrep '(queue|=|direct)'
>   queue                                            dur  autoDel  excl  msg  
> msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
>  
> =============================================================================
> ===================================================
>   amq.direct_bad38732-af89-480e-bf7a-ae953e53db27                Y        0 
> 0      0       0      0        0         1     2
> 
> 3. ./qpid-send -a "amq.direct/#" -m 1
> 
> 4. qpid-stat -q | egrep '(queue|=|direct)'
>   queue                                     dur  autoDel  excl  msg   msgIn 
> msgOut  bytes  bytesIn  bytesOut  cons  bind
>  
> =============================================================================
> ============================================
> # empty

Please what failed here? Topic subscription created by qpid-receive set auto-delete flag properly (amq.direct_bad38732-af89-480e-bf7a-ae953e53db27 queue was not auto-delete queue, so that is right). qpid-send as a message producer does not create any subscription or queue.

Comment 5 Pavel Moravec 2014-10-23 11:40:08 UTC
(In reply to Pavel Moravec from comment #4)
> (In reply to vhubeika from comment #3)
> > On 64b architecture the issue can be verified, but on the 32b arch. the
> > issue is still present:
> > 
> > 1. qpid-receive -a "amq.direct/#; {link: {x-declare:{'auto-delete':False}}}"
> > -m 1 -f
> > 2. qpid-stat -q | egrep '(queue|=|direct)'
> >   queue                                            dur  autoDel  excl  msg  
> > msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
> >  
> > =============================================================================
> > ===================================================
> >   amq.direct_bad38732-af89-480e-bf7a-ae953e53db27                Y        0 
> > 0      0       0      0        0         1     2
> > 
> > 3. ./qpid-send -a "amq.direct/#" -m 1
> > 
> > 4. qpid-stat -q | egrep '(queue|=|direct)'
> >   queue                                     dur  autoDel  excl  msg   msgIn 
> > msgOut  bytes  bytesIn  bytesOut  cons  bind
> >  
> > =============================================================================
> > ============================================
> > # empty
> 
> Please what failed here? Topic subscription created by qpid-receive set
> auto-delete flag properly (amq.direct_bad38732-af89-480e-bf7a-ae953e53db27
> queue was not auto-delete queue, so that is right). qpid-send as a message
> producer does not create any subscription or queue.

Disregard, got it.

The reason why queue is deleted(*) is because the client deletes auxiliary queue for topic subscription, whenever the queue is exclusive. That's some feature I was not aware of but makes sense (to do some garbage collection and to prevent others to use mine exclusive auxiliary queue once I am gone). So, to let the queue persist, set exclusive flag to false, i.e.:

qpid-receive -a "amq.direct/#; {link: {x-declare:{'auto-delete':False, 'exclusive':False}}}" -m 1 -f

In either case (with or without exclusive:False), the queue is not auto-delete, what was the issue of this BZ. The exclusive:False just allows us to really see the queue any time later.

(*) in my case, the queue is deleted on either architecture (i686 and x86_64).


Reassigning back to QE to confirm my observation / autoDel flag setup.

Comment 6 Valiantsina Hubeika 2014-10-23 12:41:49 UTC
verified on
qpid-cpp-0.30-2.el6.x86_64
qpid-cpp-0.30-2.el6.i686

Comment 9 errata-xmlrpc 2015-04-14 13:47:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2015-0805.html


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