Auto broker id generation logic:
1. If there is a user provided broker.id, then it is used and id range is
from 0 to reserved.broker.max.id
2. If there is no user provided broker.id, then auto id generation starts
from reserved.broker.max.id +1
3. broker.id is stored in meta.properties file under each  log directory
(log.dirs).
4. During server restart, broker reads broker.id from meta.properties(if
any) and validates
   with user provided broker.id (if any) and retains the same id.

you can read javadocs for more details
https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/server/KafkaServer.scala#L632


On Thu, May 19, 2016 at 3:28 PM, Muqtafi Akhmad <muqt...@traveloka.com>
wrote:

> dar Kafka users,
> I have two questions about automatic broker id generation when
> broker.id.generation.enable = true,
> (1) is there any documentation about how broker id generated? is it
> incremental id starting from 0 that limited to reserved.broker.max.id?
> will
> broker id be reusable?
> (2) afaik broker id should not be changed once broker has been successfully
> started, will a broker retain the same broker id after restarted?
>
> Thank you,
>
> --
> Muqtafi Akhmad
> Software Engineer
> Traveloka
>

Reply via email to