Bug 1006976 - [amqp1.0] consumer subscribed to xml exchange using xquery filter acquires always the same message
Summary: [amqp1.0] consumer subscribed to xml exchange using xquery filter acquires al...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: 3.0
: ---
Assignee: Gordon Sim
QA Contact: Petr Matousek
URL:
Whiteboard:
Depends On:
Blocks: 1010399
TreeView+ depends on / blocked
 
Reported: 2013-09-11 15:43 UTC by Petr Matousek
Modified: 2015-01-21 12:55 UTC (History)
3 users (show)

Fixed In Version: qpid-cpp-0.22-14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-21 12:55:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1004002 0 medium CLOSED [AMQP 1.0] AmqpValue sections of type string are not handled correctly 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1006980 0 medium CLOSED [amqp1.0] consumer subscribed to xml exchange using xquery-filter do not get messages sent by amqp1.0 publisher 2021-02-22 00:41:40 UTC

Internal Links: 1004002 1006980

Description Petr Matousek 2013-09-11 15:43:56 UTC
Description of problem:

When a consumer is subscribed for receiving messages from xml exchange using xquery filter, he always acquires the same message after the first matching message is delivered to him.

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

How reproducible:
100%

Steps to Reproduce:
1. declare exchange of type xml
# qpid-config add exchange xml xml
2. subscribe to the xml exchange using xquery-filter
# ./drain -f --connection-options "{protocol: 'amqp1.0'}" "xml;{link:{filter:{value:\"./colour='red' or ./colour='black'\",name:'name',descriptor:'apache.org:xquery-filter:string'}}}"
3. send two messages matching the filter with different content using 0-10 publisher
# ./spout --content '<colour>'red'</colour>' xml
# ./spout --content '<colour>'black'</colour>' xml
4. two messages are received (as expected), but the second message is the same message as the first one

Note: The behavior is the same when another client (ie. qpid-send) is used

Please see additional info for more details.

Actual results:
Only the first message matching the filter on the xml exchange subscription is delivered to the consumer. When another message matching the filter is published to the xml exchange, the consumer acquires again the first message (that was already deliver to him).

Expected results:
All the messages matching the filter are delivered to the consumer

Additional info:

term1 (consumer):
# qpid-config add exchange xml xml
# ./drain -f --connection-options "{protocol: 'amqp1.0'}" "xml;{link:{filter:{value:\"./colour='red' or ./colour='black'\",name:'name',descriptor:'apache.org:xquery-filter:string'}}}"
Message(properties={spout-id:8057661c-0e63-45a3-8275-4713175cd0c4:0, x-amqp-to:xml}, content='<colour>red</colour>')
Message(properties={spout-id:8057661c-0e63-45a3-8275-4713175cd0c4:0, x-amqp-to:xml}, content='<colour>red</colour>')

term2 (publisher):
# ./spout --content '<colour>'red'</colour>' xml
# ./spout --content '<colour>'black'</colour>' xml

Comment 1 Gordon Sim 2013-09-11 16:20:12 UTC
This is fixed by https://bugzilla.redhat.com/show_bug.cgi?id=1004002

A workaround is to explicitly clear the message after each fetch, e.g. by adding

  message = Message();

at the end of the while loop in drain.cpp

Comment 2 Petr Matousek 2013-10-25 15:15:13 UTC
This issue has been fixed. Verified on rhel6.4 (i386, x86_64).

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


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