IBM / sarama

Sarama is a Go library for Apache Kafka.
MIT License
11.42k stars 1.75k forks source link

Is it possible and how to run a preferred replica election with sarama? #2744

Open hjweddie opened 9 months ago

hjweddie commented 9 months ago

Description

I am developing kafka management tools with sarama, and I don't know that is it possible and how to run a preferred replica election with sarama?

Additional context

None

prestona commented 9 months ago

Hi @hjweddie - it looks like the elect leaders API is used to implement leader election in the Java client. Unfortunately this API is not currently implemented by Sarama. So to answer you question: no this is not currently possible with Sarama.

If you would like to contribute an implementation of the elect leaders API - I'm sure it would be gratefully received. 😄