[
https://issues.apache.org/jira/browse/KAFKA-3044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15090892#comment-15090892
]
ASF GitHub Bot commented on KAFKA-3044:
---------------------------------------
GitHub user praveend opened a pull request:
https://github.com/apache/kafka/pull/751
KAFKA-3044: Re-word consumer.poll behaviour
https://issues.apache.org/jira/browse/KAFKA-3044
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/praveend/kafka poll_doc_changes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/751.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 #751
----
commit 331a5ecc6a65212e27e8a4551ce4af3321598d1a
Author: Praveen Devarao <[email protected]>
Date: 2016-01-10T04:54:00Z
Doc change as per KAFKA-3044
----
> Consumer.poll doesnot return messages when poll interval is less
> ----------------------------------------------------------------
>
> Key: KAFKA-3044
> URL: https://issues.apache.org/jira/browse/KAFKA-3044
> Project: Kafka
> Issue Type: Bug
> Components: clients
> Affects Versions: 0.9.0.0
> Reporter: Praveen Devarao
> Assignee: Jason Gustafson
> Fix For: 0.9.0.1
>
>
> When seeking to particular position in consumer and starting poll with
> timeout param 0 the consumer does not come back with data though there is
> data published via a producer already. If the timeout is increased slowly in
> chunks of 100ms then at 700ms value the consumer returns back the record on
> first call to poll.
> Docs
> [http://kafka.apache.org/090/javadoc/org/apache/kafka/clients/consumer/KafkaConsumer.html#poll(long)]
> for poll reads if timeout is 0 then data will be returned immediately but
> the behaviour seen is that data is not returned.
> The test code I am using can be found here
> https://gist.github.com/praveend/013dcab01ebb8c7e2f2d
> I have created a topic with data published as below and then running the test
> program [ConsumerPollTest.java]
> $ bin/kafka-topics.sh --create --zookeeper localhost:2181
> --replication-factor 1 --partitions 1 --topic mytopic
> $ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic mytopic
> Hello
> Hai
> bye
> $ java ConsumerPollTest
> I have published this 3 lines of data to kafka only once....later on I just
> use the above program with different poll interval
> Let me know if I am missing anything and interpreting it wrongly.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)