Bug 997919 - subscribing a consumer to a queue using filter/selector causes already subscribed consumers to stop receiving messages
subscribing a consumer to a queue using filter/selector causes already subscr...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
Development
Unspecified Unspecified
high Severity high
: 3.0
: ---
Assigned To: Gordon Sim
Petr Matousek
:
Depends On:
Blocks: 1010399
  Show dependency treegraph
 
Reported: 2013-08-16 09:46 EDT by Petr Matousek
Modified: 2015-01-21 07:56 EST (History)
4 users (show)

See Also:
Fixed In Version: qpid-cpp-0.22-12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-01-21 07:56:35 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Apache JIRA QPID-5078 None None None Never

  None (edit)
Description Petr Matousek 2013-08-16 09:46:09 EDT
Description of problem:

Already subscribed consumer stops to receive messages when another subscription to the same queue with different subject is initiated. see 'Steps to Reproduce' for more details.

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

How reproducible:
100%

Steps to Reproduce:
1. create a shared queue 'q'
# drain --connection-options "{ protocol: 'amqp1.0' }" "q;{create:always}"
2. subscribe a cosumer1 to queue 'q' using filter 'a'
# drain -f --connection-options "{ protocol: 'amqp1.0' }" q/a
3. send several messages to towards queue 'q' with subject set to 'a'
# for i in $(seq 5); do ./spout --connection-options "{ protocol: 'amqp1.0' }" q/a; done
4. all the messages consumed by consumer1 as expected
5. subscribe cosumer2 to queue 'q' using different filter 'b'
# drain -f --connection-options "{ protocol: 'amqp1.0' }" q/b
6. repeat step 3
7. the consumer1 obtains only one message, then he stops to receive messages
8. the consumer2 may normally receive messages sent towards queue 'q' with subject set to 'b'
# spout --connection-options "{ protocol: 'amqp1.0' }" q/b
9. after the consumer1 restart, the consumer1 gets the rest of the messages (that he didn't received in step 7)

Actual results:
subscribing a consumer to a queue using filter causes already subscribed consumer to stop receive messages

Expected results:
Already subscribed consumer continues to receive messages after another consumer is subscribed using different filter 

Additional info:

terminal1 - publisher:
# ./drain --connection-options "{ protocol: 'amqp1.0' }" "q;{create:always}"
-- consumer1 has subscribed here --
# for i in $(seq 5); do ./spout --connection-options "{ protocol: 'amqp1.0' }" q/a; done
-- consumer2 has subscribed here --
# for i in $(seq 5); do ./spout --connection-options "{ protocol: 'amqp1.0' }" q/a; done
# for i in $(seq 5); do ./spout --connection-options "{ protocol: 'amqp1.0' }" q/b; done
-- consumer1 restart --

terminal2 - consumer1:
# ./drain -f --connection-options "{ protocol: 'amqp1.0' }" q/a
Message(properties={spout-id:0e05ac1c-6bee-4966-b1af-89efda0e1883:0}, content='')
Message(properties={spout-id:0e05ac1c-6bee-4966-b1af-89efda0e1883:0}, content='')
Message(properties={spout-id:0e05ac1c-6bee-4966-b1af-89efda0e1883:0}, content='')
Message(properties={spout-id:0e05ac1c-6bee-4966-b1af-89efda0e1883:0}, content='')
Message(properties={spout-id:0e05ac1c-6bee-4966-b1af-89efda0e1883:0}, content='')
-- consumer2 has subscribed here --
Message(properties={spout-id:0e05ac1c-6bee-4966-b1af-89efda0e1883:0}, content='')
-- consumer1 stopped to receive messages --
^C
# ./drain -f --connection-options "{ protocol: 'amqp1.0' }" q/a
Message(properties={spout-id:8ba06f2f-89f2-4604-b7b5-d8b211e435cb:0}, content='')
Message(properties={spout-id:8ba06f2f-89f2-4604-b7b5-d8b211e435cb:0}, content='')
Message(properties={spout-id:8ba06f2f-89f2-4604-b7b5-d8b211e435cb:0}, content='')
Message(properties={spout-id:8ba06f2f-89f2-4604-b7b5-d8b211e435cb:0}, content='')

terminal3 - consumer2:
# ./drain -f --connection-options "{ protocol: 'amqp1.0' }" q/b
Message(properties={spout-id:f1e5dfcf-281d-47b7-b91e-9d086cf37523:0}, content='')
Message(properties={spout-id:f1e5dfcf-281d-47b7-b91e-9d086cf37523:0}, content='')
Message(properties={spout-id:f1e5dfcf-281d-47b7-b91e-9d086cf37523:0}, content='')
Message(properties={spout-id:f1e5dfcf-281d-47b7-b91e-9d086cf37523:0}, content='')
Message(properties={spout-id:f1e5dfcf-281d-47b7-b91e-9d086cf37523:0}, content='')
Comment 1 Gordon Sim 2013-08-16 13:14:15 EDT
Note that this also affects selectors (over both 0-10 and 1.0). It is a side-effect of the filtering logic added to queues (hence the skip-errata flag, since this will not have been released in product yet).
Comment 2 Gordon Sim 2013-08-16 18:16:00 EDT
Fixed upstream: https://svn.apache.org/r1514907
Comment 3 Petr Matousek 2013-09-06 11:40:59 EDT
This issue has been fixed. Verified on rhel6.4 (i386,x86_64).

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

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