Hide Forgot
Description of problem: JMS's delivery flag (msg.getDeliveryTag()) which is used for counting messages in the batch is not correct as it starts at 2 and increments up. i.e. message from Python Message(properties={'spout-id': 'f6a59916-f561-1745-802b-49ce87b03a3b:0'}) is read as AMQ message number: 2 Properties: spout-id = f6a59916-f561-1745-802b-49ce87b03a3b:0 See details below. 'AMQ message number' should start either at 0 or eventually at 1. Behavior seen on RHEL4/5 i386 / x86_64, [F8/x86_64] Version-Release number of selected component (if applicable): qpid-java-0.7.946106-12, qpid-java-0.7.946106-14 possibly also earlier How reproducible: 100% Steps to Reproduce: 0. start broker 1. spout --count 3 "ADDR9; {create:always, delete:receiver}" 2. ./run_example.sh org.apache.qpid.example.Drain "ADDR; {create:always, delete:receiver}" Actual results: 'AMQ message number' starts at 2 and increments. Expected results: 'AMQ message number' should start either at 0 or eventually at 1. Additional info (transcript of simple examples): [root@dhcp-27-151 bz656488]# /usr/share/doc/python-qpid-0.7.946106/examples/api/spout --count 3 "ADDR9; {create:always, delete:receiver}" Message(properties={'spout-id': 'f6a59916-f561-1745-802b-49ce87b03a3b:0'}) Message(properties={'spout-id': 'f6a59916-f561-1745-802b-49ce87b03a3b:1'}) Message(properties={'spout-id': 'f6a59916-f561-1745-802b-49ce87b03a3b:2'}) [root@dhcp-27-151 bz656488]# ./run_example.sh org.apache.qpid.example.Drain "ADDR; {create:always, delete:receiver}" [root@dhcp-27-151 bz656488]# rpm -ql qpid-java-example /usr/share/doc/qpid-java-0.7.946106/examples /usr/share/doc/qpid-java-0.7.946106/examples/example.log4j /usr/share/doc/qpid-java-0.7.946106/examples/org /usr/share/doc/qpid-java-0.7.946106/examples/org/apache /usr/share/doc/qpid-java-0.7.946106/examples/org/apache/qpid /usr/share/doc/qpid-java-0.7.946106/examples/org/apache/qpid/example /usr/share/doc/qpid-java-0.7.946106/examples/org/apache/qpid/example/Drain.java /usr/share/doc/qpid-java-0.7.946106/examples/org/apache/qpid/example/Hello.java /usr/share/doc/qpid-java-0.7.946106/examples/org/apache/qpid/example/MapReceiver.java /usr/share/doc/qpid-java-0.7.946106/examples/org/apache/qpid/example/MapSender.java /usr/share/doc/qpid-java-0.7.946106/examples/org/apache/qpid/example/OptionParser.java /usr/share/doc/qpid-java-0.7.946106/examples/org/apache/qpid/example/Spout.java /usr/share/doc/qpid-java-0.7.946106/examples/org/apache/qpid/example/hello.properties /usr/share/doc/qpid-java-0.7.946106/examples/run_example.sh [root@dhcp-27-151 bz656488]# cd /usr/share/doc/qpid-java-0.7.946106/examples [root@dhcp-27-151 examples]# ./run_example.sh org.apache.qpid.example.Drain "ADDR9; {create:always, delete:receiver}" {} ------------- Msg ------------- Body: "" JMS Correlation ID: null JMS timestamp: 0 JMS expiration: 0 JMS priority: 4 JMS delivery mode: 2 JMS reply to: null JMS Redelivered: false JMS Destination: :///ADDR9/ADDR9?routingkey='ADDR9' JMS Type: null JMS MessageID: null JMS Content-Type: application/octet-stream AMQ message number: 2 Properties: spout-id = f6a59916-f561-1745-802b-49ce87b03a3b:0 ------------------------------- ------------- Msg ------------- Body: "" JMS Correlation ID: null JMS timestamp: 0 JMS expiration: 0 JMS priority: 4 JMS delivery mode: 2 JMS reply to: null JMS Redelivered: false JMS Destination: :///ADDR9/ADDR9?routingkey='ADDR9' JMS Type: null JMS MessageID: null JMS Content-Type: application/octet-stream AMQ message number: 3 Properties: spout-id = f6a59916-f561-1745-802b-49ce87b03a3b:1 ------------------------------- ------------- Msg ------------- Body: "" JMS Correlation ID: null JMS timestamp: 0 JMS expiration: 0 JMS priority: 4 JMS delivery mode: 2 JMS reply to: null JMS Redelivered: false JMS Destination: :///ADDR9/ADDR9?routingkey='ADDR9' JMS Type: null JMS MessageID: null JMS Content-Type: application/octet-stream AMQ message number: 4 Properties: spout-id = f6a59916-f561-1745-802b-49ce87b03a3b:2 -------------------------------
I've also encountered this issue, moreover I am missing message numbered 3 as well. The consumed 'AMQ message number' sequence is following: 2,4,5,6,7... see below This was seen on RHEL6.1 x86_64 with MRG 2.0 packages installed packages: qpid-java-client-0.10-6.el5 qpid-java-common-0.10-6.el5 qpid-java-example-0.10-6.el5 # java -cp $CLASSPATH org.apache.qpid.example.Drain -f "q" {f=} ------------- Msg ------------- Body: JMS Correlation ID: null JMS timestamp: 1311782490949 JMS expiration: 0 JMS priority: 4 JMS delivery mode: 2 JMS reply to: null JMS Redelivered: false JMS Destination: fanout://ex//?routingkey='' JMS Type: null JMS MessageID: ID:c783d97b-ccd0-3cfd-9861-4d284ff688ab JMS Content-Type: text/plain AMQ message number: 2 Properties: qpid.subject = ------------------------------- ------------- Msg ------------- Body: JMS Correlation ID: null JMS timestamp: 1311782490971 JMS expiration: 0 JMS priority: 4 JMS delivery mode: 2 JMS reply to: null JMS Redelivered: false JMS Destination: fanout://ex//?routingkey='' JMS Type: null JMS MessageID: ID:3b7a417d-69a5-3e12-a854-6e9a4d4f6ea6 JMS Content-Type: text/plain AMQ message number: 4 Properties: qpid.subject = ------------------------------- ------------- Msg ------------- Body: JMS Correlation ID: null JMS timestamp: 1311782490973 JMS expiration: 0 JMS priority: 4 JMS delivery mode: 2 JMS reply to: null JMS Redelivered: false JMS Destination: fanout://ex//?routingkey='' JMS Type: null JMS MessageID: ID:0631b297-d6e0-37de-857b-6a35614508e8 JMS Content-Type: text/plain AMQ message number: 5 Properties: qpid.subject = -------------------------------