kafka icon indicating copy to clipboard operation
kafka copied to clipboard

KAFKA-18193 Refactor Kafka Streams CloseOptions to Fluent API Style

Open m1a2st opened this issue 6 months ago • 2 comments

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.

m1a2st avatar Jun 12 '25 13:06 m1a2st

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

m1a2st avatar Jun 12 '25 13:06 m1a2st

This KIP has passed. LINK

m1a2st avatar Jun 13 '25 14:06 m1a2st

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.

github-actions[bot] avatar Jun 20 '25 03:06 github-actions[bot]

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.

github-actions[bot] avatar Jun 28 '25 03:06 github-actions[bot]

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.

github-actions[bot] avatar Jul 16 '25 03:07 github-actions[bot]

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.

github-actions[bot] avatar Aug 06 '25 03:08 github-actions[bot]

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.

github-actions[bot] avatar Aug 17 '25 03:08 github-actions[bot]

@m1a2st can you rebase to fix the merge conflicts? Thanks

Apologies for the delay in the reviewing we'll get this in soon.

bbejeck avatar Oct 03 '25 17:10 bbejeck

Thanks for @bbejeck review, I have updated the PR based on your comments, PTAL

m1a2st avatar Oct 05 '25 01:10 m1a2st

Merged #19955 into trunk

bbejeck avatar Oct 07 '25 12:10 bbejeck

Thanks for @chia7712 review, followup PR

m1a2st avatar Oct 07 '25 13:10 m1a2st