Description of problem: On receiving from an exchange, the binding is not removed after the subscription is closed. The subscription queue is removed (as expected), but the binding remains present and points to a non-existing node. This behavior may lead to message loss. When a message is sent to that exchange with the corresponding routing key, the binding takes effect and the message is routed to the non-existing queue. Please see additional info for more details. Note: The issue occurs only when using amqp1.0 protocol (the behavior is as expected when using amqp0-10 protocol). Version-Release number of selected component (if applicable): qpid-cpp-*-0.22-5 How reproducible: 100% Steps to Reproduce: 1. drain --connection-options "{protocol:'amqp1.0'}" amq.direct/a 2. qpid-config exchanges -r | grep -A1 amq.direct (a binding to "<unknown>" queue is listed) 3. spout --connection-options "{protocol:'amqp1.0'}" amq.direct/a 4. use 'qpid-stat -e' to realize that the message was routed to the non-existing queue instead of being dropped Actual results: The subscription queue is removed, but the link binding is not removed after the link is closed (i.e. sender/receiver closes). Expected results: link binding is removed after the link is closed. Additional info: # $cppapi/drain --connection-options "{protocol:'amqp1.0'}" amq.direct/a # qpid-stat -e | grep amq.direct amq.direct direct Y 1 0 0 0 0 0 0 # qpid-config exchanges -r | grep -A1 amq.direct Exchange 'amq.direct' (direct) bind [a] => <unknown> # $cppapi/spout --connection-options "{protocol:'amqp1.0'}" amq.direct/a # qpid-stat -e | grep amq.direct amq.direct direct Y 1 1 1 0 0 0 0 # qpid-tool qpid: list binding Object Summary: ID Created Destroyed Index ========================================== <snip> 107 09:09:06 - 118.139.a </sip> qpid: show 107 Object of type: org.apache.qpid.broker:binding:_data(79311b0b-4077-92c0-2001-79e75225daa3) Attribute 107 ===================== exchangeRef 118 queueRef 139 bindingKey a arguments {} origin absent msgMatched 1 qpid: show 139 No object found with ID 139
Fixed upstream by https://svn.apache.org/r1497282
Verified 6.4 x86_64 qpid-cpp-client-0.22-11.el6.x86_64 qpid-cpp-client-devel-0.22-11.el6.x86_64 qpid-cpp-client-devel-docs-0.22-11.el6.noarch qpid-cpp-client-rdma-0.22-11.el6.x86_64 qpid-cpp-client-ssl-0.22-11.el6.x86_64 qpid-cpp-debuginfo-0.22-11.el6.x86_64 qpid-cpp-server-0.22-11.el6.x86_64 qpid-cpp-server-devel-0.22-11.el6.x86_64 qpid-cpp-server-ha-0.22-11.el6.x86_64 qpid-cpp-server-rdma-0.22-11.el6.x86_64 qpid-cpp-server-ssl-0.22-11.el6.x86_64 qpid-cpp-server-store-0.22-11.el6.x86_64 qpid-cpp-server-xml-0.22-11.el6.x86_64 qpid-cpp-tar-0.22-11.el6.noarch rh-qpid-cpp-tests-0.22-11.el6.x86_64 6.4 i686 qpid-cpp-client-0.22-11.el6.i686 qpid-cpp-client-devel-0.22-11.el6.i686 qpid-cpp-client-devel-docs-0.22-11.el6.noarch qpid-cpp-client-rdma-0.22-11.el6.i686 qpid-cpp-client-ssl-0.22-11.el6.i686 qpid-cpp-debuginfo-0.22-11.el6.i686 qpid-cpp-server-0.22-11.el6.i686 qpid-cpp-server-devel-0.22-11.el6.i686 qpid-cpp-server-ha-0.22-11.el6.i686 qpid-cpp-server-rdma-0.22-11.el6.i686 qpid-cpp-server-ssl-0.22-11.el6.i686 qpid-cpp-server-store-0.22-11.el6.i686 qpid-cpp-server-xml-0.22-11.el6.i686 qpid-cpp-tar-0.22-11.el6.noarch rh-qpid-cpp-tests-0.22-11.el6.i686