brandboat commented on code in PR #14873:
URL: https://github.com/apache/kafka/pull/14873#discussion_r2442794887
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManager.java:
##########
@@ -116,30 +122,33 @@ public HeartbeatRequestManager(
this.logger = logContext.logger(getClass());
this.membershipManager = membershipManager;
this.backgroundEventHandler = backgroundEventHandler;
- this.rebalanceTimeoutMs =
config.getInt(CommonClientConfigs.MAX_POLL_INTERVAL_MS_CONFIG);
+ this.maxPollIntervalMs =
config.getInt(CommonClientConfigs.MAX_POLL_INTERVAL_MS_CONFIG);
long retryBackoffMs =
config.getLong(ConsumerConfig.RETRY_BACKOFF_MS_CONFIG);
long retryBackoffMaxMs =
config.getLong(ConsumerConfig.RETRY_BACKOFF_MAX_MS_CONFIG);
- this.heartbeatState = new HeartbeatState(subscriptions,
membershipManager, rebalanceTimeoutMs);
+ this.heartbeatState = new HeartbeatState(subscriptions,
membershipManager, maxPollIntervalMs);
this.heartbeatRequestState = new HeartbeatRequestState(logContext,
time, 0, retryBackoffMs,
- retryBackoffMaxMs, rebalanceTimeoutMs);
+ retryBackoffMaxMs, maxPollIntervalMs);
Review Comment:
Hi all, and apologies for jumping in on an older PR. I noticed we use
`max.poll.interval.ms` (default 300000) as the jitter value. Although
`RequestState.remainingBackoffMs` guards with Math.max(0, …), which won’t make
the value become negative, using a jitter that isn’t in (0–1) seems unexpected.
Was there a design consideration behind this?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]