[
https://issues.apache.org/jira/browse/ARTEMIS-5519?focusedWorklogId=973194&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-973194
]
ASF GitHub Bot logged work on ARTEMIS-5519:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 25/Jun/25 13:01
Start Date: 25/Jun/25 13:01
Worklog Time Spent: 10m
Work Description: tabish121 commented on code in PR #5793:
URL: https://github.com/apache/activemq-artemis/pull/5793#discussion_r2166663498
##########
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:
Updated the default to true
Issue Time Tracking
-------------------
Worklog Id: (was: 973194)
Time Spent: 50m (was: 40m)
> 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: 50m
> 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