Now that librdkafka supports cooperative sticky partitions assignment strategy, we should ensure that consumers that commit offsets manually can’t commit offsets during rebalance as it triggers a follow up rebalance.
I don’t think there is any valid use cases for allowing this type of behavior:
I believe this issue with manual auto commit is isolated to cooperative sticky
strategy because when a consumer uses the eager
strategy, a rebalance starts with all the partitions being revoked and ends when new partitions have been assigned to the consumer. As a result, the consumer will never attempt to commit offsets because there are no offsets to be committed. Of course, if the consumer uses cooperative sticky, we can’t ensure that the consumer won’t attempt to commit offsets during a rebalance as the consumer might still own partitions during a rebalance. Furthermore, clients have no way of knowing that a rebalance is ongoing or not and so they can’t prevent consumers from committing offsets when necessary.
I see three potential solutions to this problem, but I think the first one makes the most sense to implement:
rd_kafka_commit
to not attempt to commit offsets during rebalancesIMPORTANT: We will close issues where the checklist has not been completed.
Please provide the following information:
v1.8.2
v2.7.1
"partition.assignment.strategy": "cooperative-sticky"
"enable.auto.commit": false,
<REPLACE with e.g., Centos 5 (x64)>
debug=..
as necessary) from librdkafkaRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4