Skip to content

KAFKA-18193 Refactor Kafka Streams CloseOptions to Fluent API Style #19955

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

Open
wants to merge 8 commits into
base: trunk
Choose a base branch
from

Conversation

m1a2st
Copy link
Collaborator

@m1a2st m1a2st commented Jun 12, 2025

In Kafka Streams, configuration classes typically follow a fluent API
pattern to ensure a consistent and intuitive developer experience.
However, the current implementation of
org.apache.kafka.streams.KafkaStreams$CloseOptions deviates from this
convention by exposing a public constructor, breaking the uniformity
expected across the API.

To address this inconsistency, we propose introducing a new
CloseOptions class that adheres to the fluent API style, replacing the
existing implementation. The new class will retain the existing
timeout(Duration) and leaveGroup(boolean) methods but will enforce
fluent instantiation and configuration. Given the design shift, we will
not maintain backward compatibility with the current class.

This change aligns with the goal of standardizing configuration objects
across Kafka Streams, offering developers a more cohesive and
predictable API.

@github-actions github-actions bot added triage PRs from the community streams tools labels Jun 12, 2025
@m1a2st
Copy link
Collaborator Author

m1a2st commented Jun 12, 2025

This patch should wait until the KIP-1153 vote concludes.

@m1a2st
Copy link
Collaborator Author

m1a2st commented Jun 13, 2025

This KIP has passed. LINK

Copy link

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant