Bug 1024957 - [amqp1.0] receiver may consume from queue that is exclusive for another session
Summary: [amqp1.0] receiver may consume from queue that is exclusive for another session
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 3.0
: ---
Assignee: Gordon Sim
QA Contact: Petr Matousek
URL:
Whiteboard:
Depends On:
Blocks: 1010399
TreeView+ depends on / blocked
 
Reported: 2013-10-30 16:08 UTC by Petr Matousek
Modified: 2015-01-21 12:57 UTC (History)
4 users (show)

Fixed In Version: qpid-cpp-0.22-25.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-21 12:57:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Apache JIRA QPID-5279 0 None None None Never

Description Petr Matousek 2013-10-30 16:08:55 UTC
Description of problem:

When a queue is declared to be exclusive, the queue shall not be available to any other consumers until the session that declared the queue has been closed. 

Using amqp1.0 the queue is available for another consumers(using different session) even if declared exclusive.

Note: amqp0-10 consumer is refused on amqp1.0 declared exclusive queue as expected with the following exception:
resource-locked: resource-locked: Cannot subscribe to exclusive queue q

Version-Release number of selected component (if applicable):
qpid-cpp-*-0.22-23.el6

How reproducible:
100%

Steps to Reproduce:
1. drain -t 30 --connection-options "{protocol: 'amqp1.0'}" "q;{create:receiver, node:{properties:{'exclusive': True}}}" & 
2. $cppapi/drain  --connection-options "{protocol: 'amqp1.0'}" q
3. the second receiver succeeds subscribing to exclusive queue

Actual results:
amqp1.0 receiver may consume from queue that is exclusive (locked to other session)

Expected results:
Exception is thrown due to the resource is locked

Additional info:

# $cppapi/spout -c 100 "q;{create:always}"
# $cppapi/drain -t 30 -c 100 --connection-options "{protocol: 'amqp1.0'}" "q;{node:{properties:{'exclusive': True}}, create:always}" >1 & 
[1] 24226
# $cppapi/drain  --connection-options "{protocol: 'amqp1.0'}" q >2
# cat 1 | wc -l
53
# cat 2 | wc -l
47
# qpid-config queues
Queue Name                                Attributes
=================================================================
d44c676b-2e10-4eae-bbb6-394a551cd7ea:0.0  auto-del excl 
q                                         excl

Comment 1 Gordon Sim 2013-10-31 14:10:49 UTC
Fixed upstream: https://svn.apache.org/r1537496

Comment 2 Petr Matousek 2013-11-12 17:08:02 UTC
This issue has been fixed (tested both amqp0-10/1.0). 
Verified on rhel6.4 (i386, x86_64).

packages used for testing:
qpid-cpp-*-0.22-25.el6

-> VERIFIED


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