Description of problem: The node declared using 'delete-if-unused' lifetime policy shall be removed if there remain no links for which the node is either the source or target. Following example violates this rule: ./spout --connection-options "{protocol: 'amqp1.0'}" "#MyQ;{node:{properties:{lifetime-policy:delete-if-unused}}}" Even there is a message on the queue, there is no link an thus the queue shall be deleted. Note: This may also happen on existing queue, ie: # drain -t 5 -c 1 --connection-options "{protocol: 'amqp1.0'}" "MyName2;{create:always, node:{properties:{lifetime-policy:delete-if-unused}}}" & # ./qc2_spout --connection-options "{protocol: 'amqp1.0'}" -c 2 --duration 6 "MyName2" after both the drain and the spout ends the queue remain existing Version-Release number of selected component (if applicable): qpid-cpp-*-0.22-30 How reproducible: 100% Steps to Reproduce: 1. ./spout --connection-options "{protocol: 'amqp1.0'}" "#MyQ;{node:{properties:{lifetime-policy:delete-if-unused}}}" 2. queue was not removed Actual results: The node defined with 'delete-if-unused' policy is not removed after all the links are closed Expected results: Node removed after all the incoming/outgoing links are closed Additional info: # ./spout --connection-options "{protocol: 'amqp1.0'}" "#MyQ;{node:{properties:{lifetime-policy:delete-if-unused}}}" # qpid-stat -q Queues queue dur autoDel excl msg msgIn msgOut bytes bytesIn bytesOut cons bind =================================================================================================================================================================================================== 1a72dc75-dc8b-4619-9cb4-be9e561741fe_95ff371f-288a-4055-87fa-62cf31d18aaf#MyQ_aa745925-0fcf-43de-8cff-80a53348f85f Y 1 1 0 65 65 0 0 1 db0132df-6aad-4bec-be7b-7ed3494da00f:0.0 Y Y 0 0 0 0 0 0 1 2 # service qpidd restart Stopping Qpid AMQP daemon: [ OK ] Starting Qpid AMQP daemon: [ OK ] # $cppapi/drain -t 5 -c 1 --connection-options "{protocol: 'amqp1.0'}" "MyName2;{create:always, node:{properties:{lifetime-policy:delete-if-unused}}}" & [1] 18585 # ./qc2_spout --connection-options "{protocol: 'amqp1.0'}" -c 2 --duration 6 "MyName2" & [2] 18586 Message(properties={spout-id:9ecced48-10a4-40b9-a7f9-9bad1cf750cf:0}, content='') # qpid-stat -q Queues queue dur autoDel excl msg msgIn msgOut bytes bytesIn bytesOut cons bind ========================================================================================================================= MyName2 Y 0 1 1 0 65 65 0 1 d9438806-7746-4629-ad8f-7b6d5e1ae9a0:0.0 Y Y 0 0 0 0 0 0 1 2 [1]- Done $cppapi/drain -t 5 -c 1 --connection-options "{protocol: 'amqp1.0'}" "MyName2;{create:always, node:{properties:{lifetime-policy:delete-if-unused}}}" # sleep 6 [2]+ Done ./qc2_spout --connection-options "{protocol: 'amqp1.0'}" -c 2 --duration 6 "MyName2" # qpid-stat -q Queues queue dur autoDel excl msg msgIn msgOut bytes bytesIn bytesOut cons bind ========================================================================================================================= 2ac4159b-70d3-4d6b-b1d6-6c05077356e9:0.0 Y Y 0 0 0 0 0 0 1 2 MyName2 Y 1 2 1 65 130 65 0 1
Fixed upstream: https://svn.apache.org/r1557279
This issue has been fixed. Verified on rhel6.5 (x86_64, i386). packages under test: qpid-cpp-*-0.22-33 -> VERIFIED