KAFKA-18193 Refactor Kafka Streams CloseOptions to Fluent API Style
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.
This patch should wait until the KIP-1153 vote concludes.
This KIP has passed. 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.
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.
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.
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.
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.
@m1a2st can you rebase to fix the merge conflicts? Thanks
Apologies for the delay in the reviewing we'll get this in soon.
Thanks for @bbejeck review, I have updated the PR based on your comments, PTAL
Merged #19955 into trunk
Thanks for @chia7712 review, followup PR