You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jason Gustafson (JIRA)" <ji...@apache.org> on 2015/12/17 23:54:46 UTC

[jira] [Commented] (KAFKA-3007) new Consumer should expose mechanism to fetch single message, consumer.poll(timeout, maxMessageLimit)

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

Jason Gustafson commented on KAFKA-3007:
----------------------------------------

Ok, that makes sense. Keep in mind that you also have "max.partition.fetch.bytes", which restricts how much data will be returned for a single partition, but you need to have some estimate of the maximum number of partitions you'll consume to take advantage of it. I've started to sketch a KIP for introducing a max messages feature which I can post in the next few days. It would be great if you can take a look once posted and give feedback.

> new Consumer should expose mechanism to fetch single message, consumer.poll(timeout, maxMessageLimit)
> -----------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-3007
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3007
>             Project: Kafka
>          Issue Type: Improvement
>          Components: consumer
>    Affects Versions: 0.9.0.0
>            Reporter: aarti gupta
>            Assignee: Neha Narkhede
>
> Currently, the consumer.poll(timeout)
> returns all messages that have not been acked since the last fetch
> The only way to process a single message, is to throw away all but the first message in the list
> This would mean we are required to fetch all messages into memory, and this coupled with the client being not thread-safe, (i.e. we cannot use a different thread to ack messages, makes it hard to consume messages when the order of message arrival is important, and a large number of messages are pending to be consumed)



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