AndrewJSchofield commented on code in PR #19430: URL: https://github.com/apache/kafka/pull/19430#discussion_r2066391545
########## clients/clients-integration-tests/src/test/java/org/apache/kafka/clients/consumer/ShareConsumerTest.java: ########## @@ -2000,6 +1998,29 @@ public void testShareConsumerAfterCoordinatorMovement() throws Exception { verifyShareGroupStateTopicRecordsProduced(); } + @ClusterTest + public void testDeliveryCountNotIncreaseAfterSessionClose() { Review Comment: Please can we have another test for explicit acknowledgement. In this case, for closing a share session normally, there is a difference between records which have been delivery and acknowledged by the application, and those which are released automatically as a result of the share session close. So, the test case could: * Create a new share consumer setting explicit acknowledgement mode * Fetch 2 records * Acknowledge the first record with AcknowledgeType.RELEASE * Commit the acknowledgement * Close the consumer * Create a new consumer and fetch the 2 records again The delivery count for the first record should be 2, while the delivery count for the second record should be 1. This is because we know the first record was delivered, but the second we do not. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org