Reputation: 537
I want to give some time to my consumer to restart so that unnecessary rebalance doesnt happen. How can I do that? In case of shutdown, I want replication to come in picture and after some time if consumer is not back up, rebalance should occur else not.
Upvotes: 7
Views: 12546
Reputation: 3191
Looks like this was addressed in the meantime with client configuration:
https://github.com/tulios/kafkajs/issues/1237
Upvotes: 0
Reputation: 125
There's broker level config called group.initial.rebalance.delay.ms
you can tweak.
The amount of time the group coordinator will wait for more consumers to join a new group before performing the first rebalance. A longer delay means potentially fewer rebalances, but increases the time until processing begins.
https://kafka.apache.org/documentation/
Upvotes: 4