You could also take a thread dump to try to find them by their network
threads. For example this is how new producer network threads are named:

String ioThreadName = "kafka-producer-network-thread" +
(clientId.length() > 0 ? " | " + clientId : "");



On Fri, Mar 6, 2015 at 1:04 PM, Gwen Shapira <gshap...@cloudera.com> wrote:

> It doesn't keep track specifically, but there are open sockets that may
> take a while to clean themselves up.
>
> Note that if you use the async producer and don't close the producer
> nicely, you may miss messages as the connection will close before all
> messages are sent. Guess how we found out? :)
>
> Similar for consumer, if you use high level consumer and don't close the
> consumer nicely, you may not acknowledge the last messages and they will be
> re-read next time the consumer starts, leading to duplicates.
>
> Gwen
>
>
>
> On Fri, Mar 6, 2015 at 12:40 PM, Stuart Reynolds <s...@stureynolds.com>
> wrote:
>
> > One of our staff has has been terrible at adding finally clauses to
> > close kafka resources.
> >
> > Does the kafka scala/Java client maintain a count or list of open
> > producers/consumers/client connections?
> >
>



-- 
Thanks,
Ewen

Reply via email to