Enhance reconnection mechanism of agent kafka reporter plugin. (#6855)
This commit is contained in:
parent
36c61fcfa9
commit
ea0390e454
|
|
@ -127,6 +127,7 @@ public class KafkaProducerManager implements BootService, Runnable {
|
|||
producer = new KafkaProducer<>(properties, new StringSerializer(), new BytesSerializer());
|
||||
} catch (Exception e) {
|
||||
LOGGER.error(e, "connect to kafka cluster '{}' failed", KafkaReporterPluginConfig.Plugin.Kafka.BOOTSTRAP_SERVERS);
|
||||
return;
|
||||
}
|
||||
//notify listeners to send data if no exception been throw
|
||||
notifyListeners(KafkaConnectionStatus.CONNECTED);
|
||||
|
|
|
|||
Loading…
Reference in New Issue