[jira] [Commented] (QPID-7541) [Java Broker] Close Consumers when a Queue is deleted
[ https://issues.apache.org/jira/browse/QPID-7541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16494923#comment-16494923 ] Alex Rudyy commented on QPID-7541: -- As part of discussion on user mailing list [What is AMQP 1-0 spec complaint Broker behaviour for deletion of queue with consumers attached?|https://lists.apache.org/thread.html/3e64db4411925250b02e3f4648263a648c4406f1bbcb342369eeb06a@%3Cusers.qpid.apache.org%3E] the following consistent models for queue deletion were suggested: * when deleting a queue which has had messages "consumed" by an uncommitted transaction, the queue deletion treats those messages as if the transaction had already rolled back (e.g. puts them on a DLQ or whatever), and then the transaction itself is marked as rollback only. There is an implicit serialisation here that says that deleting the queue is an atomic operation and while it occurs you cannot process transaction commits/rollbacks which affect messages on the queue (nor can you allow new messages on to the queue nor allow acknowledgement of messages during the 'delete' operation). * a queue cannot be deleted while there are associated sending or receiving links I attached a patch implementing both approaches. The patch make changes to prevent the deletion of queue with any associated sending or receiving links by default. However, this default behaviour can be switched off by setting context variable {{qpid.queue.deleteUnusedOnly}} to {{false}} which would allow queue deletion as below: * detaches all links with an error "amqp:resource-deleted" * any in-progress producing/consuming transactions are marked as rollback-only * the remaining messages on the deleted queue can be moved alternate binding if one is configured Please note, that implemented changes do not add any locks for delete operation. Some more work is required to eliminate the races when the transaction discharge starts before the queue deletion marks the transaction as rollback-only. The queue delete operation should wait for the discharging transactions to complete. > [Java Broker] Close Consumers when a Queue is deleted > - > > Key: QPID-7541 > URL: https://issues.apache.org/jira/browse/QPID-7541 > Project: Qpid > Issue Type: Bug > Components: Broker-J >Reporter: Lorenz Quack >Priority: Major > Fix For: qpid-java-broker-7.1.0 > > Attachments: > 0001-QPID-7541-Broker-J-Close-Consumers-when-a-Queue-is-d.patch, > proton-j_client.log, simultaneous_closing.log > > > Currently when a Queue is deleted the associated Consumers are not closed. > This is essentially a resource leak. > Note: In 6.1.x, for the AMQP 1.0 protocol, deleting a queue did detach the > sending links (without error). Receiving links were not detached. This > code (org.apache.qpid.server.protocol.v1_0.ConsumerTarget_1_0#queueDeleted) > was removed in 7.0.x and this JIRA raised. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Commented] (QPID-7541) [Java Broker] Close Consumers when a Queue is deleted
[ https://issues.apache.org/jira/browse/QPID-7541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16420346#comment-16420346 ] Artyom Safronov commented on QPID-7541: --- P. S. I want to clarify that the described behavior is actual for version 6.1.4 (version 7.0.0 reacts normally). > [Java Broker] Close Consumers when a Queue is deleted > - > > Key: QPID-7541 > URL: https://issues.apache.org/jira/browse/QPID-7541 > Project: Qpid > Issue Type: Bug > Components: Broker-J >Reporter: Lorenz Quack >Priority: Major > Fix For: qpid-java-broker-7.1.0 > > Attachments: proton-j_client.log, simultaneous_closing.log > > > Currently when a Queue is deleted the associated Consumers are not closed. > This is essentially a resource leak. > Note: In 6.1.x, for the AMQP 1.0 protocol, deleting a queue did detach the > sending links (without error). Receiving links were not detached. This > code (org.apache.qpid.server.protocol.v1_0.ConsumerTarget_1_0#queueDeleted) > was removed in 7.0.x and this JIRA raised. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Commented] (QPID-7541) [Java Broker] Close Consumers when a Queue is deleted
[ https://issues.apache.org/jira/browse/QPID-7541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16415860#comment-16415860 ] Artyom Safronov commented on QPID-7541: --- I found other odd behavior. Next steps were done: * 3 queues were created * after while they were deleted * my app found that because REST API returned no queues * my app sent close requests (one by one) to the broker *but received all responses after the first request* (see the log) > [Java Broker] Close Consumers when a Queue is deleted > - > > Key: QPID-7541 > URL: https://issues.apache.org/jira/browse/QPID-7541 > Project: Qpid > Issue Type: Bug > Components: Broker-J >Reporter: Lorenz Quack >Priority: Major > Fix For: qpid-java-broker-7.0.3 > > Attachments: proton-j_client.log > > > Currently when a Queue is deleted the associated Consumers are not closed. > This is essentially a resource leak. > Note: In 6.1.x, for the AMQP 1.0 protocol, deleting a queue did detach the > sending links (without error). Receiving links were not detached. This > code (org.apache.qpid.server.protocol.v1_0.ConsumerTarget_1_0#queueDeleted) > was removed in 7.0.x and this JIRA raised. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Commented] (QPID-7541) [Java Broker] Close Consumers when a Queue is deleted
[ https://issues.apache.org/jira/browse/QPID-7541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16415809#comment-16415809 ] Artyom Safronov commented on QPID-7541: --- Deleting of a queue is a exceptional situation. But it was interesting to see how our application would react in this case. The system designed to listen all queues of a virtual host and automatically determine if there are some changes with queues (added or deleted). It requests the broker periodically using REST API. I've just expected that the broker would notify clients about deletion of a queue. > [Java Broker] Close Consumers when a Queue is deleted > - > > Key: QPID-7541 > URL: https://issues.apache.org/jira/browse/QPID-7541 > Project: Qpid > Issue Type: Bug > Components: Broker-J >Reporter: Lorenz Quack >Priority: Major > Fix For: qpid-java-broker-7.0.3 > > Attachments: proton-j_client.log > > > Currently when a Queue is deleted the associated Consumers are not closed. > This is essentially a resource leak. > Note: In 6.1.x, for the AMQP 1.0 protocol, deleting a queue did detach the > sending links (without error). Receiving links were not detached. This > code (org.apache.qpid.server.protocol.v1_0.ConsumerTarget_1_0#queueDeleted) > was removed in 7.0.x and this JIRA raised. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Commented] (QPID-7541) [Java Broker] Close Consumers when a Queue is deleted
[ https://issues.apache.org/jira/browse/QPID-7541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16411245#comment-16411245 ] Keith Wall commented on QPID-7541: -- Thanks for the log. In answer to your question, in Broker-J 6.1.4, deleting a queue does detach the sending links (i.e. the client's JMS consumers). The receiving links are not detached. 7.0.x doesn't do this.. In my comment above I was referring to 7.0.x's behaviour. Separately - a curiosity for my own background. What is it in your system that causes you to delete the queues? It is that you have a production use-case relying on the ability to delete a queue? Or is this deleting a queue an exceptional action in your system that would say, be taken by an operator trying in an attempt to manage a severely backlogged system. > [Java Broker] Close Consumers when a Queue is deleted > - > > Key: QPID-7541 > URL: https://issues.apache.org/jira/browse/QPID-7541 > Project: Qpid > Issue Type: Bug > Components: Broker-J >Reporter: Lorenz Quack >Priority: Major > Fix For: qpid-java-broker-7.0.3 > > Attachments: proton-j_client.log > > > Currently when a Queue is deleted the associated Consumers are not closed. > This is essentially a resource leak. > Note: In 6.1.x, for the AMQP 1.0 protocol, deleting a queue did detach the > sending links (without error). Receiving links were not detached. This > code (org.apache.qpid.server.protocol.v1_0.ConsumerTarget_1_0#queueDeleted) > was removed in 7.0.x and this JIRA raised. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Commented] (QPID-7541) [Java Broker] Close Consumers when a Queue is deleted
[ https://issues.apache.org/jira/browse/QPID-7541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16400433#comment-16400433 ] Artyom Safronov commented on QPID-7541: --- Here it is. [^proton-j_client.log] The important moment is a queue have to be deleted within 10 seconds after a receiver/sender is attached to it. > [Java Broker] Close Consumers when a Queue is deleted > - > > Key: QPID-7541 > URL: https://issues.apache.org/jira/browse/QPID-7541 > Project: Qpid > Issue Type: Bug > Components: Broker-J >Reporter: Lorenz Quack >Priority: Major > Fix For: qpid-java-broker-7.0.3 > > Attachments: proton-j_client.log > > > Currently when a Queue is deleted the associated Consumers are not closed. > This is essentially a resource leak. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Commented] (QPID-7541) [Java Broker] Close Consumers when a Queue is deleted
[ https://issues.apache.org/jira/browse/QPID-7541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16400365#comment-16400365 ] Keith Wall commented on QPID-7541: -- > It looks like if a queue is deleted and recreated with the same name within a > short period then an event about that is sent. That sounds odd. There is a TODO in the Broker-J code related to this Jira related to the handling of existing consumers when queues are deleted. What event do you mean exactly? Can you repeat with environment variable {{PN_TRACE_FRM}} set {{true}} on your application side and capture the protocol trace written by the Proton library? > [Java Broker] Close Consumers when a Queue is deleted > - > > Key: QPID-7541 > URL: https://issues.apache.org/jira/browse/QPID-7541 > Project: Qpid > Issue Type: Bug > Components: Broker-J >Reporter: Lorenz Quack >Priority: Major > Fix For: qpid-java-broker-7.0.3 > > > Currently when a Queue is deleted the associated Consumers are not closed. > This is essentially a resource leak. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Commented] (QPID-7541) [Java Broker] Close Consumers when a Queue is deleted
[ https://issues.apache.org/jira/browse/QPID-7541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16400301#comment-16400301 ] Artyom Safronov commented on QPID-7541: --- It looks like if a queue is deleted and recreated with the same name within a short period then an event about that is sent. > [Java Broker] Close Consumers when a Queue is deleted > - > > Key: QPID-7541 > URL: https://issues.apache.org/jira/browse/QPID-7541 > Project: Qpid > Issue Type: Bug > Components: Broker-J >Reporter: Lorenz Quack >Priority: Major > Fix For: qpid-java-broker-7.0.3 > > > Currently when a Queue is deleted the associated Consumers are not closed. > This is essentially a resource leak. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Commented] (QPID-7541) [Java Broker] Close Consumers when a Queue is deleted
[ https://issues.apache.org/jira/browse/QPID-7541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16400296#comment-16400296 ] Artyom Safronov commented on QPID-7541: --- It is interesting but sometimes my client receives a notification if a queue was deleted. Is it possible? > [Java Broker] Close Consumers when a Queue is deleted > - > > Key: QPID-7541 > URL: https://issues.apache.org/jira/browse/QPID-7541 > Project: Qpid > Issue Type: Bug > Components: Broker-J >Reporter: Lorenz Quack >Priority: Major > Fix For: qpid-java-broker-7.0.3 > > > Currently when a Queue is deleted the associated Consumers are not closed. > This is essentially a resource leak. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Commented] (QPID-7541) [Java Broker] Close Consumers when a Queue is deleted
[ https://issues.apache.org/jira/browse/QPID-7541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16400275#comment-16400275 ] Artyom Safronov commented on QPID-7541: --- It is interesting but sometimes my client receives a notification if a queue was deleted. > [Java Broker] Close Consumers when a Queue is deleted > - > > Key: QPID-7541 > URL: https://issues.apache.org/jira/browse/QPID-7541 > Project: Qpid > Issue Type: Bug > Components: Broker-J >Reporter: Lorenz Quack >Priority: Major > > Currently when a Queue is deleted the associated Consumers are not closed. > This is essentially a resource leak. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Commented] (QPID-7541) [Java Broker] Close Consumers when a Queue is deleted
[ https://issues.apache.org/jira/browse/QPID-7541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16400133#comment-16400133 ] Artyom Safronov commented on QPID-7541: --- I am using Proton-J library. > [Java Broker] Close Consumers when a Queue is deleted > - > > Key: QPID-7541 > URL: https://issues.apache.org/jira/browse/QPID-7541 > Project: Qpid > Issue Type: Bug > Components: Broker-J >Reporter: Lorenz Quack >Priority: Major > > Currently when a Queue is deleted the associated Consumers are not closed. > This is essentially a resource leak. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Commented] (QPID-7541) [Java Broker] Close Consumers when a Queue is deleted
[ https://issues.apache.org/jira/browse/QPID-7541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16399427#comment-16399427 ] Keith Wall commented on QPID-7541: -- Yes - this is certainly a gap and something I would like to fix soon. For AMQP 1.0 connections, I think the Broker ought to be [detaching|http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#type-detach] the link with an appropriate error. The older protocols, AMQP 0-10 and AMQP 0-8..91 didn't really make provision for this. They have a {{message.cancel}} and {{basic.cancel}} (respectively) but these where defined as sent from a client to server and not the other way around. For these protocols all that can be done is to close the session/channel or the close the entire connection. Artyom, which client library are you using with the Broker? > [Java Broker] Close Consumers when a Queue is deleted > - > > Key: QPID-7541 > URL: https://issues.apache.org/jira/browse/QPID-7541 > Project: Qpid > Issue Type: Bug > Components: Broker-J >Reporter: Lorenz Quack >Priority: Major > > Currently when a Queue is deleted the associated Consumers are not closed. > This is essentially a resource leak. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Commented] (QPID-7541) [Java Broker] Close Consumers when a Queue is deleted
[ https://issues.apache.org/jira/browse/QPID-7541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16398854#comment-16398854 ] Artyom Safronov commented on QPID-7541: --- Recently I found a strange behavior in my opinion. A queue was deleted but my client was not notified about this event. Is it normal situation? Should not the broker send "CLOSE" frame to a receiver/sender? > [Java Broker] Close Consumers when a Queue is deleted > - > > Key: QPID-7541 > URL: https://issues.apache.org/jira/browse/QPID-7541 > Project: Qpid > Issue Type: Bug > Components: Broker-J >Reporter: Lorenz Quack >Priority: Major > > Currently when a Queue is deleted the associated Consumers are not closed. > This is essentially a resource leak. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org