Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complementary fix of partition rebalnce issue(wvanbergen#62)
This is complementary fix for wvanbergen#68 (issue: wvanbergen#62), before the re-implementation (wvanbergen#72) is ready. In my use case, the message consuming logic is sometimes time consuming, even with 3 times retry as the fix in pull#68, it's still easy to have the issue#62. Furhter checking current logic in consumer_group.go:partitionConsumer(), it may take as many as cg.config.Offsets.ProcessingTimeout to ReleasePartition so that the partition can be claimed by new consumer during rebalance. So just simply set the max retry time same as cg.config.Offsets.ProcessingTimeout, which is 60s by default. Verified this the system including this fix with frequent rebalance operations, the issue does not occur again.
- Loading branch information