It is worth mentioning you can reduce the likelyhood of loosing message by running the controlled shutdown before killing the broker.
https://cwiki.apache.org/confluence/display/KAFKA/Replication+tools#Replicationtools-Whatiscontrolledshutdown? The connection refused is a bit surprising though. The consumer should normally react by switching to the new leader. Are you getting this error from the killed broker or the new leader? On Tue, Dec 17, 2013 at 7:54 PM, Guozhang Wang <wangg...@gmail.com> wrote: > Hello Francois, > > What is the producer ack value in your console producer? If it is equal to > 1 then when a leader is down it is possible to lose data, and hence not > consumed by the consumer. > > Guozhang > > > On Tue, Dec 17, 2013 at 2:39 PM, Francois Langelier < > francois.langel...@mate1inc.com> wrote: > > > Hi, > > > > I installed zookeeper and kafka 8.0 following the quick start ( > > https://kafka.apache.org/documentation.html#quickstart) and when i try > to > > kill my leader, i got a lot of exception in my producer and consumer > > consoles. > > > > Then, after the exceptions stop printing, some of the messages I produce > in > > my console don't print in my consumer console... > > > > The exception I get is "java.net.ConnectException : Connection refused". > > > > Did someone already had this problem? > > > > Thank you! > > > > PS: I have 3 brokers running on my system. > > > > > > -- > -- Guozhang >