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

Guozhang Wang commented on KAFKA-2843:
--------------------------------------

Is the simple consumer consuming from only one topic-partition or multiple 
topic-partitions? You may want to check if other partitions has enough data to 
fill-in the fetch request and hence it skipped this partition.

Also, if this is constantly reproducible in a non-production environment, could 
you check the difference between the fetch offset and returned HW? 

> when consumer got empty messageset, fetchResponse.highWatermark != 
> current_offset?
> ----------------------------------------------------------------------------------
>
>                 Key: KAFKA-2843
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2843
>             Project: Kafka
>          Issue Type: Bug
>          Components: offset manager
>    Affects Versions: 0.8.2.1
>            Reporter: netcafe
>            Assignee: jin xing
>
> I use simple consumer fetch message from brokers (fetchSize > 
> messageSize),when consumer got empty messageSet,e.g :
>     val offset = nextOffset
>     val request = buildRequest(offset)
>     val response = consumer.fetch(request)
>     val msgSet = fetchResponse.messageSet(topic, partition)
>     
>   if (msgSet.isEmpty) {
>       val hwOffset = fetchResponse.highWatermark(topic, partition)
>       
>       if (offset == hwOffset) {
>        // ok, doSomething...
>       } else {  
>          // in our scene, i found highWatermark may not equals current offset 
> ,but we did not reproduced it.
>       // Is this case could happen ?  if could, why ?
>       }
>     }



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

Reply via email to