See https://issues.apache.org/jira/browse/QPID-3481
Reproducer: Run the following Python script against a broker: ======== start ======== from qpid.messaging import Connection conn=Connection("localhost") conn.open() sess = conn.session() rx = sess.receiver("amq.direct/key;{link:{x-declare:{alternate-exchange:'amq.fanout'}}}") tx = sess.sender("amq.direct/key") tx.send("TEST") tx.send("TEST") tx.send("TEST") tx.send("TEST") tx.send("TEST") m = rx.fetch() m = rx.fetch() m = rx.fetch() sess.close() conn.close() ======== end ======== Once this is done, use "qpid-stat -e" to look at the "msgIn" counter on the amq.fanout exchange. The correct value is 5; with the bug, the value will be 2 because the three acquired-but-not-acknowledged messages will not be routed to the alternate exchange.
Fixed upstream in Qpid SVN revision 1239728. This update will be picked up in Qpid 0.16
From my point of view, the behaviour reported in comment 1 is correct. The reliability for subscription queues (receiver for exchange) is unreliable by default. The three fetched messages are implicitly accepted, thus only the two remaining messages shall be routed to the alternate exchange. Ted, I assume you forgot to provide 'reliability:at-least-once' in the receiver definition of the reproducer, am I correct? The current implementation meets my expectation: When the reliability option is not provided (unreliable by default) only two messages are routed to the alternate exchange. When the subscription queue is set to be reliable all 5 messages are routed to the alternate exchange. (this was actually a bug on previous packages, the 3 acquired-but-not-acknowledged messages were not routed to the alt.exchange) So the issue seems to be fixed, assuming the following change in the reproducer provided in comment 1: - rx = sess.receiver("amq.direct/key;{link:{x-declare:{alternate-exchange:'amq.fanout'}}}") + rx = sess.receiver("amq.direct/key;{link:{reliability:at-least-once,x-declare:{alternate-exchange:'amq.fanout'}}}")
This issue has been fixed. Verified on rhel5.8 and rhel6.3 (x86_64, i386) packages used for testing: qpid-cpp-0.18-2 -> can be moved to VERIFIED after Ted confirms my assumptions made in comment 4.
(In reply to comment #5) > This issue has been fixed. > > Verified on rhel5.8 and rhel6.3 (x86_64, i386) > > packages used for testing: > qpid-cpp-0.18-2 > > -> can be moved to VERIFIED after Ted confirms my assumptions made in > comment 4. Confirmed, please move to VERIFIED
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0561.html