chia7712 commented on code in PR #21424:
URL: https://github.com/apache/kafka/pull/21424#discussion_r2784771300
##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumerTest.java:
##########
@@ -1814,6 +1814,38 @@ public void testUnsubscribeWithoutGroupId() {
verify(applicationEventHandler).add(ArgumentMatchers.isA(UnsubscribeEvent.class));
}
+ /**
+ * Verify that unsubscribe() does not commit offsets even when auto-commit
is enabled.
+ * This ensures users are aware that they need to explicitly call
commitSync() before
+ * unsubscribing to avoid duplicate processing upon re-joining the group.
+ */
+ @Test
Review Comment:
Could you consider adding a integration tests instead?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]