You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/11/10 16:06:24 UTC

[GitHub] [activemq] dhmgit opened a new pull request #571: Adding an option which allows messages to expire on active durable subscriptions

dhmgit opened a new pull request #571:
URL: https://github.com/apache/activemq/pull/571


   When an *active* durable subscription fails to acknowledge messages due to being offline/unreliable/misbehaved, messages which expire according to their TTL are not marked expired on that subscription. This can lead to an unbounded number of messages building up in the message store, eventually exhausting quotas and causing backpressure. This PR introduces a new broker-level setting `enableMessageExpirationOnActiveDurableSubs` which allows messages to expire on *active* durable subscriptions.
   
   We have been running with this setting enabled in quite a few production environments for a couple of years with no observed ill effects. Even so, the new setting is disabled by default to ensure backward compatibility. This is my first attempt to submit a PR to this repo, so please let me know if I need to provide additional information. 
   
   I did not attempt to create a new JIRA issue as there are at least two related issues out there already which appear to be related:
   AMQ-6636
   AMQ-7212


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [activemq] dhmgit commented on pull request #571: Adding an option which allows messages to expire on active durable subscriptions

Posted by GitBox <gi...@apache.org>.
dhmgit commented on pull request #571:
URL: https://github.com/apache/activemq/pull/571#issuecomment-1082266184


   @ncasaux , apologies for not seeing your comment earlier -- it was buried in a list of several hundred notifications.
   
   This PR is from a while back and was itself based on work that I had done at least a couple years prior. This is to say that I might not be remembering all the details 100% correctly. 
   
   We run .NET applications in on-premises customer environments that we do not control. Those applications use the NMS client library to connect to AMQ, and consume topics using durable subscriptions. In certain customer environments, these client applications can experience sustained unreliable network connectivity. The reasons for the flaky connectivity were varied, but the common result was that some clients would get into a state where they would fail to acknowledge messages. On the other hand, those same clients managed to reconnect (via the failover transport) often enough to keep their durable subscriptions active. Without the setting introduced by this PR, those unACKed messages continue to be referenced by those active subscriptions well after the message TTL expires. This was ultimately leading to quota exhaustion as those expired messages could never be purged.
   
   I hope that helps!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [activemq] ncasaux commented on pull request #571: Adding an option which allows messages to expire on active durable subscriptions

Posted by GitBox <gi...@apache.org>.
ncasaux commented on pull request #571:
URL: https://github.com/apache/activemq/pull/571#issuecomment-1036039870


   Hello,
   
   Could you please clarify this :
   > When an active durable subscription fails to acknowledge messages due to being offline/unreliable/misbehaved
   
   _offline_ seems to be the opposite of _active_, so does this apply when the durable subscriber is offline ? Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [activemq] dhmgit commented on pull request #571: Adding an option which allows messages to expire on active durable subscriptions

Posted by GitBox <gi...@apache.org>.
dhmgit commented on pull request #571:
URL: https://github.com/apache/activemq/pull/571#issuecomment-1083078512


   Having put more thought into it, I believe I had a good reason to include the word "offline" to describe another type of failure which was reported by our customers. This was not a failure that we could reproduce in our dev/test environments with a network emulator, and I'm a bit reluctant to give a second-hand account, but here it goes: some of our customers were (against documented recommendations) installing our client application on laptops/tablets which would lapse into power-saver modes, fail to acknowledge messages, yet somehow still keep the durable subscription active. These same customers also claimed to have extremely reliable networks, and, to the best of our ability to verify from a distance, those claims appeared to be justified.
   
   So while "offline" is probably not the best choice of word, it was intended to call out a specific failure mode -- just not one we were able to reproduce and analyze in detail.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [activemq] jbonofre merged pull request #571: Adding an option which allows messages to expire on active durable subscriptions

Posted by GitBox <gi...@apache.org>.
jbonofre merged pull request #571:
URL: https://github.com/apache/activemq/pull/571


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [activemq] ncasaux commented on pull request #571: Adding an option which allows messages to expire on active durable subscriptions

Posted by GitBox <gi...@apache.org>.
ncasaux commented on pull request #571:
URL: https://github.com/apache/activemq/pull/571#issuecomment-1082350016


   Thanks for the clarification! In your case, your subscription is actually _active_
   So, from what you explain, I would understand your sentence this way:
   > When an active durable subscription fails to acknowledge messages due to being ~~offline~~/unreliable/misbehaved


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [activemq] ncasaux edited a comment on pull request #571: Adding an option which allows messages to expire on active durable subscriptions

Posted by GitBox <gi...@apache.org>.
ncasaux edited a comment on pull request #571:
URL: https://github.com/apache/activemq/pull/571#issuecomment-1036039870


   Hello,
   
   Could you please clarify this :
   > When an active durable subscription fails to acknowledge messages due to being offline/unreliable/misbehaved
   
   _offline_ seems to be the opposite of _active_, so does this apply when the durable subscriber is _offline_ ? Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org