[ https://issues.apache.org/jira/browse/KAFKA-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15477973#comment-15477973 ]
ASF GitHub Bot commented on KAFKA-4135: --------------------------------------- GitHub user vahidhashemian opened a pull request: https://github.com/apache/kafka/pull/1839 KAFKA-4135: Consumer polls when not subscribed to any topic or assigned any partition should raise an exception When the consumer is not subscribed to any topic or, in the case of manual assignment, is not assigned any partition, calling `poll()` should raise an exception. You can merge this pull request into a Git repository by running: $ git pull https://github.com/vahidhashemian/kafka KAFKA-4135 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1839.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1839 ---- commit f66891a59f8c5e93fd128cdaae179c6cef4eb025 Author: Vahid Hashemian <vahidhashem...@us.ibm.com> Date: 2016-09-09T18:56:56Z KAFKA-4135: Consumer polls when not subscribed to any topic or assigned any partition should raise an exception When consumer is not subscribed to any topic or, in the case of manual assignment, is not assigned any partition calling `poll()` should lead to an exception. ---- > Inconsistent javadoc for KafkaConsumer.poll behavior when there is no > subscription > ---------------------------------------------------------------------------------- > > Key: KAFKA-4135 > URL: https://issues.apache.org/jira/browse/KAFKA-4135 > Project: Kafka > Issue Type: Bug > Components: consumer > Reporter: Jason Gustafson > Assignee: Vahid Hashemian > Priority: Minor > > Currently, the javadoc for {{KafkaConsumer.poll}} says the following: > "It is an error to not have subscribed to any topics or partitions before > polling for data." However, we don't actually raise an exception if this is > the case. Perhaps we should? -- This message was sent by Atlassian JIRA (v6.3.4#6332)