Skip to content

Conversation

mimaison
Copy link
Contributor

  • Use Admin instead of AdminClient
  • Use Map.of/List.of instead of Collections/Arrays
  • Use constants for Kafka client configs
  • Remove ZooKeeper mentions
  • Clean some Javadoc

- Use Admin instead of AdminClient
- Use Map.of/List.of instead of Collections/Arrays
- Use constants for Kafka client configs
- Remove ZooKeeper mentions
- Clean some Javadoc

Signed-off-by: Mickael Maison <[email protected]>
Copy link
Member

@see-quick see-quick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mimaison, I have one question. Anyway, it looks good.

ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, systemUnderTest.getBootstrapServers(),
ConsumerConfig.GROUP_ID_CONFIG, "tc-" + UUID.randomUUID(),
ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, OffsetResetStrategy.EARLIEST.name().toLowerCase(Locale.ROOT)
ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OffsetResetStrategy is deprecated since 4.0: https://kafka.apache.org/41/javadoc/org/apache/kafka/clients/consumer/OffsetResetStrategy.html.
There seems to be an issue as the recommended replacement AutoOffsetResetStrategy is not part of the public API. Tracking that in upstream Kafka.

Copy link
Member

@see-quick see-quick Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it does feel like something slipped through the design cracks => I mean deprecating OffsetResetStrategy makes sense, but introducing AutoOffsetResetStrategy without exposing it in the public API kind of defeats the purpose. So the plan would be to add AutoOffsetResetStrategy to the public API or from now we would use pure strings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the plan is to keep OffsetResetStrategy deprecated and not advertise AutoOffsetResetStrategy in the javadoc as it's for internal usages only. So users will now need to hard code earliest/latest.

@see-quick see-quick added this to the 0.113.0 milestone Oct 14, 2025
Copy link
Member

@see-quick see-quick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mimaison 👍 .

@see-quick see-quick requested a review from a team October 14, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants