Search code examples
apache-kafkamicronaut

How does micronaut-kafka handle the error when the connection to the broker is lost?


I have multiple Kafka brokers. How micronaut-kafka deal with the error when one broker goes down? Does it automatically switch to another broker?


Solution

  • That's not handled by Micronaut but by Apache Kafka client.

    Depending on the cluster configuration (unclean election) the partition leader might move to a different broker, and producers/consumers pointing there would reconnect after discovering that the old leader is unavailable.

    TDLR: Apache Kafka is designed to be highly available service, the frontend (client) impact should be minimal.