What would happen to commitSync()
or it's variants when a rebalance has happened due to failure of not the current consumer but because of failure of some other consumer in the same group.
Say, consumer-1 (c1) was assigned partitions 1 & 2 (p1 and p2) out of say a total of 10 partitions. c1 has done a poll() and fetched 200 records from p1 (offset 400 to 500) and p2(offset 1300 to 1400), then processed them and is about to commit. But between c1's poll() and commit some other consumer has failed and a re-balance has happened. And C1 got assigned to partitions p4 and p6. Now will c1 be still able to commit the offsets to p1 and p2 (which he was assigned to earlier) or will it lead to an exception like CommitFailedException
?
"This can happen when a group rebalance completes before the commit could be successfully applied."
- this addresses my issue – joven