You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Guozhang Wang (JIRA)" <ji...@apache.org> on 2013/11/22 03:02:35 UTC

[jira] [Created] (KAFKA-1140) Move the decoding logic from ConsumerIterator.makeNext to next

Guozhang Wang created KAFKA-1140:
------------------------------------

             Summary: Move the decoding logic from ConsumerIterator.makeNext to next
                 Key: KAFKA-1140
                 URL: https://issues.apache.org/jira/browse/KAFKA-1140
             Project: Kafka
          Issue Type: Bug
            Reporter: Guozhang Wang
            Assignee: Guozhang Wang


Usually people will write code around consumer like

while(iter.hasNext()) {
try {
  msg = iter.next()
  // do something
}
catch{
}
}

----

However, the iter.hasNext() call itself can throw exceptions due to decoding failures. It would be better to move the decoding to the next function call.



--
This message was sent by Atlassian JIRA
(v6.1#6144)