[ 
https://issues.apache.org/jira/browse/ARTEMIS-5519?focusedWorklogId=973175&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-973175
 ]

ASF GitHub Bot logged work on ARTEMIS-5519:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Jun/25 10:31
            Start Date: 25/Jun/25 10:31
    Worklog Time Spent: 10m 
      Work Description: gemmellr commented on code in PR #5793:
URL: https://github.com/apache/activemq-artemis/pull/5793#discussion_r2166377045


##########
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/bridge/AMQPBridgeConstants.java:
##########
@@ -135,6 +135,25 @@ public final class AMQPBridgeConstants {
     */
    public static final boolean DEFAULT_DISABLE_RECEIVER_DEMAND_TRACKING = 
false;
 
+   /**
+    * Configuration property that controls if a bridge from address receiver 
that has been configured
+    * to use durable subscriptions will prefer to use a shared durable 
subscription if the remote peer
+    * indicates in its connection capabilities that it supports them. Using a 
shared subscription can
+    * avoid a rare edge case race on rapid attach and re-attach cycles due to 
demand coming and going
+    * rapidly which leads to a stuck consumer. Enabling this on configurations 
that previously did not
+    * have this option or had it disabled could lead to orphaning a previous 
subscription so care should
+    * be taken when enabling this option.
+    */
+   public static final String PREFER_SHARED_DURABLE_SUBSCRIPTIONS = 
"preferSharedDurableSubscriptions";
+
+   /**
+    * Default value for whether a bridge from address receiver that has been 
told to use durable subscriptions
+    * should prefer to use a shared durable address subscriptions or a 
standard JMS style non-shared durable
+    * subscription. We default to false to ensure that older installations 
that upgrade don't suddenly leave
+    * orphaned subscriptions from previous bridge address receivers.
+    */
+   public static final boolean DEFAULT_PREFER_SHARED_DURABLE_SUBSCRIPTIONS = 
false;

Review Comment:
   The earlier base durable sub functionality (added in #5683) has not been 
released yet, so if ever wanting to change this I think it would actually be 
reasonable to do so now.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 973175)
    Time Spent: 40m  (was: 0.5h)

> Enable AMQP Bridge address receiver to use shared durable subscriptions
> -----------------------------------------------------------------------
>
>                 Key: ARTEMIS-5519
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5519
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: AMQP
>    Affects Versions: 2.41.0
>            Reporter: Timothy A. Bish
>            Assignee: Timothy A. Bish
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 2.42.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> If a broker reports that it supports shared durable subscriptions the AMQP 
> bridge address receiver could use those types of subscriptions to avoid a 
> potential corner case where many rapid cycles of consumer demand being added 
> and removed can lead to a race on processing the detach frame and allow the 
> previous link to be stolen right before it is remotely closed. This corner 
> case does not happen in most scenarios due to the presence of the link credit 
> drain out and the idle link keep alive delay but depending on those 
> configurations it is still possible.  By default this patch does not switch 
> to always using shared subscriptions as that can leave an orphaned durable 
> queue if already using durable address subscriptions but we can eventually 
> move that direction in a major version update.  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to