3
votes

This can be a stupid question but I am curious if it is possible to disable Consumer Rebalancing in Spring Kafka. Imagine I have a Topic with 3 partitions and 3 different consumers running using @KafkaListener on different TopicPartitions. Is it possible to not let rebalancing happen if one of the consumers is down? (I want to do manual offset management and when the consumer is up I want to start from where I left).

1

1 Answers

1
votes

You can have three different consumers on each partation with auto offset is false, and you can manually submit the offset. So whenever consumer stops and start it will read from previous offset, and also assigning consumer to specific partition will not rebalance among another partitions