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

ASF GitHub Bot commented on KAFKA-3280:
---------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/kafka/pull/968


> KafkaConsumer Javadoc contains misleading description of heartbeat behavior 
> and correct use
> -------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-3280
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3280
>             Project: Kafka
>          Issue Type: Bug
>          Components: consumer
>    Affects Versions: 0.9.0.0
>            Reporter: Richard Whaling
>            Assignee: Neha Narkhede
>              Labels: doc
>             Fix For: 0.10.0.0
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> The KafkaConsumer Javadoc says that: "The consumer will automatically ping 
> the cluster periodically, which lets the cluster know that it is alive. As 
> long as the consumer is able to do this it is considered alive and retains 
> the right to consume from the partitions assigned to it."  This is false.  
> The heartbeat process is neither automatic nor periodic.  The consumer 
> heartbeats exactly once when poll() is called.  The consumer's run thread is 
> responsible for calling poll() before session.timeout.ms elapses.
> Based on this misinformation, it is easy for a naive implementer to build a 
> batch-based kafka consumer that takes longer than session.timeout.ms between 
> poll() calls and encounter very ugly rebalance loops that can be very hard to 
> diagnose.  Clarification in the docs would help a lot--I'll submit a patch 
> shortly.



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

Reply via email to