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

[WIP] Update GroupRebalanceConfig to not require session.timeout.ms #17529

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
package org.apache.kafka.clients;

import org.apache.kafka.clients.consumer.ConsumerConfig;

Check notice on line 19 in clients/src/main/java/org/apache/kafka/clients/GroupRebalanceConfig.java

View workflow job for this annotation

GitHub Actions / build / Compile and Check Java

Checkstyle error

Disallowed import - org.apache.kafka.clients.consumer.ConsumerConfig.
import org.apache.kafka.clients.consumer.GroupProtocol;

Check notice on line 20 in clients/src/main/java/org/apache/kafka/clients/GroupRebalanceConfig.java

View workflow job for this annotation

GitHub Actions / build / Compile and Check Java

Checkstyle error

Disallowed import - org.apache.kafka.clients.consumer.GroupProtocol.
import org.apache.kafka.common.config.AbstractConfig;
import org.apache.kafka.common.requests.JoinGroupRequest;

Expand Down Expand Up @@ -48,7 +50,11 @@
public final boolean leaveGroupOnClose;

public GroupRebalanceConfig(AbstractConfig config, ProtocolType protocolType) {
this.sessionTimeoutMs = config.getInt(CommonClientConfigs.SESSION_TIMEOUT_MS_CONFIG);
if (protocolType == ProtocolType.CONSUMER && config.getString(ConsumerConfig.GROUP_PROTOCOL_CONFIG).equals(GroupProtocol.CONSUMER.name())) {
this.sessionTimeoutMs = 0;
} else {
this.sessionTimeoutMs = config.getInt(CommonClientConfigs.SESSION_TIMEOUT_MS_CONFIG);
}

// Consumer and Connect use different config names for defining rebalance timeout
if ((protocolType == ProtocolType.CONSUMER) || (protocolType == ProtocolType.SHARE)) {
Expand Down
Loading