[ 
https://issues.apache.org/jira/browse/KAFKA-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14542708#comment-14542708
 ] 

Jun Rao commented on KAFKA-2169:
--------------------------------

Thought a bit more about this. When handling handleSessionEstablishmentError() 
in the consumer, we can't just exit since that will kill the application.

There's a patch in KAFKA-1082 to upgrade to zkclient-0.4. The patch there tries 
to auto reconnect in handleSessionEstablishmentError() by ingesting a session 
expiration event through zkclient.process(). This handles the situation better. 
However, the approach doesn't quite work since zkclient.process() can only be 
called from the event thread in zkclient. So, I am not sure if there is an easy 
way to auto reconnect through the zkclient interface.

Given that handleSessionEstablishmentError is a rare event and we are removing 
the ZK dependency in the new consumer, perhaps we can do the following.
1. In the listeners in the consumer, just log this as an error. We just need to 
log this error in one of the listeners.
2. In the listeners in the broker, exit on such an error. To be consistent with 
1, we can just exit in one of the listeners.


> Upgrade to zkclient-0.5
> -----------------------
>
>                 Key: KAFKA-2169
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2169
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.8.2.0
>            Reporter: Neha Narkhede
>            Assignee: Parth Brahmbhatt
>            Priority: Critical
>         Attachments: KAFKA-2169.patch, KAFKA-2169.patch, 
> KAFKA-2169_2015-05-11_13:52:57.patch
>
>
> zkclient-0.5 is released 
> http://mvnrepository.com/artifact/com.101tec/zkclient/0.5 and has the fix for 
> KAFKA-824



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to