Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARTEMIS-5085 use retry parameters on initial connection #5281

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

jbertram
Copy link
Contributor

@jbertram jbertram commented Oct 2, 2024

When the Core client attempts to create the initial connection to a broker when initialConnectAttempts > 1 it will adhere to retryInterval, but it will ignore retryIntervalMultiplier & maxRetryInterval. This commit fixes that so that these parameters are taken into account.

@jbertram jbertram force-pushed the ARTEMIS-5085 branch 2 times, most recently from f246816 to 0bf3463 Compare October 2, 2024 19:24
@@ -764,7 +764,7 @@ private void failoverOrReconnect(final Object connectionID,
failoverRetries++;
if (failoverRetryPredicate.test(false, failoverRetries)) {
waitForRetry(failoverRetryInterval);
failoverRetryInterval = getNextRetryInterval(failoverRetryInterval);
failoverRetryInterval = serverLocator.getNextRetryInterval(failoverRetryInterval, retryIntervalMultiplier, retryInterval);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not clear on why this passes retryInterval in the function's (maxRetryInterval) argument vs passing the configured maxRetryInterval, is that intentional ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bug. Nice catch!

When the Core client attempts to create the initial connection to a
broker when initialConnectAttempts > 1 it will adhere to retryInterval,
but it will ignore retryIntervalMultiplier & maxRetryInterval. This
commit fixes that so that these parameters are taken into account.
@tabish121 tabish121 merged commit 8a1f9e8 into apache:main Oct 2, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants