kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Melville <amelvi...@g.hmc.edu>
Subject Best Way to Check Producer's Connection to Kafka
Date Wed, 15 Apr 2015 07:09:09 GMT
Hi All,

What is the lightest way to check if the connection to Kafka is up or not?
Currently I'm having the producer attempt to send a message to a topic, and
then catching a TimeoutException and handling logic inside of the catch
statement. This doesn't seem like the right way to do this, though. Is
there a way to check if the connection is up without resorting to control
flow through Exceptions?

I'm using Kafka 0.8.2


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message