Kafka is a distributed and replicated messaging system. Decommissioning brokers can become a tedious task sometimes. In lieu of that, we thought of introducing this section to keep you informed about some of the steps you should perform for decommissioning the broker.
You can automate this using any scripting language. In general, you should perform the following steps:
- Log in to the Zookeeper shell, and from there, collect the relevant broker information based on the broker IP or hostname.
- Next, based on the broker information collected from Zookeeper, you should gather information about which topics and partition data need to be reassigned to different brokers. You can use Kafka topic shell-based utilities to gather such information. Basically, topic partitions that require reassignment are identified with leader and replicas values that are equal to...