@Otis thanks for your answer. Of course it is not about manually watching connection. We already have monitoring tools in place. But I would expect the kafka client to provide means for get notified about potential connectivity issues. Actual behavior is this: the client retries to reconnect indefinitely (I see errors in logs). What I need, is a kind of listener which would be invoked when the connection state change. In other words, once the client notice the problem and is trying to reconnect, our monitoring tools would reflect the connection state as soon as the problem appears.
Thanks, Alex On 16 October 2014 13:09, Alex Objelean <alex.objel...@gmail.com> wrote: > Hi, > > I'm trying to monitor the kafka connection on the consumer side. In other > words, if the broker cluster is unavailable (or zookeer dies), I would like > to know about that problem as soon as possible. > Unfortunately, I didn't find anything useful to achieve that when using > kafka library. > Are there any suggestions about how to fix this issue? > > Thanks, > Alex >