[
https://issues.apache.org/jira/browse/ARTEMIS-5304?focusedWorklogId=956972&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-956972
]
ASF GitHub Bot logged work on ARTEMIS-5304:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 13/Feb/25 20:56
Start Date: 13/Feb/25 20:56
Worklog Time Spent: 10m
Work Description: tabish121 commented on code in PR #5493:
URL: https://github.com/apache/activemq-artemis/pull/5493#discussion_r1955201294
##########
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/federation/AMQPFederationConfiguration.java:
##########
@@ -76,12 +77,20 @@ public final class AMQPFederationConfiguration {
public static final boolean DEFAULT_IGNNORE_QUEUE_CONSUMER_PRIORITIES =
false;
/**
- * Default timeout (milliseconds) applied to federation receivers that are
being closed due to removal
+ * Default timeout (milliseconds) applied to federation receivers that are
being stopped due to removal
* of local demand and need to drain link credit and process any in-flight
deliveries before closure.
* If the timeout elapses before the link has quiesced the link is forcibly
closed.
*/
public static final int DEFAULT_RECEIVER_QUIESCE_TIMEOUT = 60_000;
+ /**
+ * Default timeout (milliseconds) applied to federation receivers that have
been stopped due to lack of
+ * local demand. The close delay prevent a link from detaching in cases
where demand drops and returns
+ * in quick succession allowing for faster recovery. The idle timeout kicks
in once the link has completed
+ * its drain of outstanding credit.
+ */
+ public static final int DEFAULT_RECEIVER_IDLE_TIMEOUT = 60_000;
Review Comment:
Fair point and I thought about it but was thinking of starting simpler with
one configuration option for both. After thinking on it I will split the
configuration for address and queue consumers as there is a chance of a race if
federation of durable subscriptions is in play where it could still read
message sent when it was removed and re-added for instance. Queue consumers
are fine with a longer timeout as the behavior is the same on the remote
regardless of any timeout.
Issue Time Tracking
-------------------
Worklog Id: (was: 956972)
Time Spent: 50m (was: 40m)
> Allow AMQP Federation consumer to idle for a period of time when demand is
> removed
> ----------------------------------------------------------------------------------
>
> Key: ARTEMIS-5304
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5304
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: AMQP
> Affects Versions: 2.39.0
> Reporter: Timothy A. Bish
> Assignee: Timothy A. Bish
> Priority: Minor
> Labels: pull-request-available
> Fix For: 2.40.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> When demand is removed from a tracked address or queue the AMQP federation
> instance will drain the receiver link and then close it which can lead of
> attach / detach of receiver links in cases where the receiver that generated
> the demand comes back quickly. This can happen based on the framework in use
> by the application or from spotty networks. We should idle the consumer for
> some period of time before closing after we drain the link credit to allow
> for quick recovery by simply granting a new batch of credit.
--
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