kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ewen Cheslack-Postava <e...@confluent.io>
Subject Re: Possible to count for unclosed resources in process
Date Fri, 06 Mar 2015 21:41:52 GMT
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 <gshapira@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 <stu@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

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