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
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
This issue has been fixed. Verified on rhel6.4 (i386, x86_64). packages used for testing: qpid-cpp-*-0.22-22.el6