Reputation: 24
This is a conceptual description of a Kafka duplicate consumption scenario that we are seeing in our load test environment:
2022-11-17 08:24:21,809 INFO [consumer-0-C-1] o.a.k.c.c.i.ConsumerCoordinator [ConsumerCoordinator.java:1156] [Consumer clientId=consumer-xms-batch-mt-callback-3, groupId=xms-batch-mt-callback] Failing OffsetCommit request since the consumer is not part of an active group
This happens sometimes when executing a test case with application instance restart during moderate traffic load (consumption of 1000 records per second). By contrast, when there is no duplication, the partition revocation is logged first and only after that there are log entries for failing offset commits.
Is duplicate consumption expected behaviour in this use case? I would think not, and I have a hard time understanding how it's even possible with a synchronous consumer. My understanding is that the listener thread always does polling and consumption sequentially, and that partition revocation happens during polling.
We are using kafka-clients version 3.1.1 and spring-kafka version 2.8.6, and I haven't found any known defect that explains the duplication.
We started off with AckMode MANUAL, then changed to MANUAL_IMMEDIATE in case it could be tied to deferred commits.
Upvotes: 0
Views: 633
Reputation: 24
Reported as a spring-kafka defect, fix will be included in release 3.0.1.
Upvotes: 0