use of io.confluent.kafka.schemaregistry.leaderelector.kafka.KafkaGroupLeaderElector in project schema-registry by confluentinc.
the class KafkaSchemaRegistry method init.
@Override
public void init() throws SchemaRegistryException {
try {
kafkaStore.init();
} catch (StoreInitializationException e) {
throw new SchemaRegistryInitializationException("Error initializing kafka store while initializing schema registry", e);
}
try {
config.checkBootstrapServers();
log.info("Joining schema registry with Kafka-based coordination");
leaderElector = new KafkaGroupLeaderElector(config, myIdentity, this);
leaderElector.init();
} catch (SchemaRegistryStoreException e) {
throw new SchemaRegistryInitializationException("Error electing leader while initializing schema registry", e);
} catch (SchemaRegistryTimeoutException e) {
throw new SchemaRegistryInitializationException(e);
}
}
Aggregations