Description of problem: Qpid java amqp 1.0 sender client with declared address property "delete:always" hangs (or timeouts) when sends a message to the exclusive queue declared by client subscribed to it. Version-Release number of selected component (if applicable): qpid-java-common-0.30-7.el6.noarch qpid-java-client-0.30-7.el6.noarch How reproducible: Always Steps to Reproduce: 1. Subscribe to the exclusive queue org.apache.qpid.example.qc2_drain --timeout 20 --log-msgs dict --broker guest/guest@brokerIP:5672 --connection-options "{ sasl_mechanisms : 'PLAIN', protocol : 'amqp0-10' }" --duration 20 "exclusive_q;{'node': {'x-declare': {'exclusive': True}}, 'create': 'always'}" 2. Send a message to this queue and delete it with this client (deletion should fail with an "exclusive queue in use" error). org.apache.qpid.example.qc2_spout --log-msgs dict --broker guest/guest@brokerIP:5672 --connection-options "{ sasl_mechanisms : 'PLAIN', protocol : 'amqp0-10' }" --count 1 "test_node_x_declare_map_exclusive_property-exclusive_q;{'delete': 'always'}" Actual results: [ clients]$ java -cp "/usr/share/java/qpid-deps/geronimo-jms_1.1_spec-1.1.1.redhat-1.jar:/usr/share/java/qpid-deps/slf4j-api-1.6.4.redhat-1.jar:/usr/share/java/qpid-deps/slf4j-log4j12-1.6.4.redhat-1.jar:/usr/share/java/log4j.jar:/usr/share/java/qpid-common-0.30.0.redhat-1.jar:/usr/share/java/qpid-client-0.30.0.redhat-1.jar:/var/dtests/node_data/clients:/var/dtests/node_data/clients/java/qpid:/var/dtests/node_data/reproducers" -Dlog4j.configuration=log4j.properties org.apache.qpid.example.qc2_spout --log-msgs dict --broker guest/guest@brokerIP:5672 --connection-options "{sasl_mechanisms : 'PLAIN'}" --count 1 "exclusive_q;{'delete': 'always'}" {'redelivered': False, 'subject': None, 'id': None, 'correlation_id': None, 'priority': 4, 'durable': True, 'destination': 'test_node_x_declare_map_exclusive_property-exclusive_q', 'type': None, 'expiration': 0, 'timestamp': 1444640560188, 'properties': {'spout_id': '70f51c0f-c7aa-40f6-b8b9-c627702f1ebe:0'}, 'content': None} main 2015-10-12 11:03:40,201 ERROR [apache.qpid.example.MessagingExceptionListener] Error! javax.jms.JMSException: Exception thrown against AMQConnection: Host: brokerIP Port: 5672 Virtual Host: test Client ID: test Active session count: 1: org.apache.qpid.AMQException: timed out waiting for sync: complete = 3, point = 5 [error code 541: internal error] at org.apache.qpid.client.AMQConnection.exceptionReceived(AMQConnection.java:1297) at org.apache.qpid.client.AMQSession_0_10.setCurrentException(AMQSession_0_10.java:1097) at org.apache.qpid.client.AMQSession_0_10.sendClose(AMQSession_0_10.java:440) at org.apache.qpid.client.AMQSession.close(AMQSession.java:842) at org.apache.qpid.client.AMQSession.close(AMQSession.java:810) at org.apache.qpid.client.AMQSession.close(AMQSession.java:540) at org.apache.qpid.example.SpoutClient.<init>(SpoutClient.java:326) at org.apache.qpid.example.qc2_spout.<init>(qc2_spout.java:26) at org.apache.qpid.example.qc2_spout.main(qc2_spout.java:42) Caused by: org.apache.qpid.AMQException: timed out waiting for sync: complete = 3, point = 5 [error code 541: internal error] at org.apache.qpid.client.AMQSession_0_10.setCurrentException(AMQSession_0_10.java:1081) ... 7 more Expected results: Client should report an "unable to delete exclusive queue in use" error. Additional info: Python client: python]$ ./qc2_spout.py --log-msgs dict --broker guest/guest@brokerIP:5672 --connection-options "{ sasl_mechanisms : 'PLAIN', protocol : 'amqp0-10' }" --count 1 "test_node_x_declare_map_exclusive_property-exclusive_q;{'delete': 'always'}" ... resource-locked: Cannot delete queue exclusive_q; it is exclusive to another session (/builddir/build/BUILD/qpid-cpp-0.34/src/qpid/broker/SessionAdapter.cpp:335)(405) Cpp client clients]$ ./qc2_spout --log-msgs dict --broker guest/guest@brokerIP:5672 --connection-options "{ sasl_mechanisms : 'PLAIN', protocol : 'amqp0-10' }" --count 1 "test_node_x_declare_map_exclusive_property-exclusive_q;{'delete': 'always'}" ... 2015-10-12 11:00:23 [Client] warning Exception received from broker: resource-locked: Cannot delete queue test_node_x_declare_map_exclusive_property-exclusive_q; it is exclusive to another session (/builddir/build/BUILD/qpid-cpp-0.34/src/qpid/broker/SessionAdapter.cpp:335) [caused by 6 \x08:\x02] resource-locked: Cannot delete queue exclusive_q; it is exclusive to another session (/builddir/build/BUILD/qpid-cpp-0.34/src/qpid/broker/SessionAdapter.cpp:335)