New consumer config property "max.poll.records" is getting introduced in upcoming 0.10 release. This property can be used to control the no. of records in each poll.
Manikumar On Tue, Apr 12, 2016 at 6:26 PM, Oleg Zhurakousky < ozhurakou...@hortonworks.com> wrote: > Is there a way to specify in KafkaConsumer up to how many messages do I > want o receive? I am operation under premise that Consumer.poll(..) returns > a batch of messages, but not sure if there is a way to control batch amount. > > Cheers > Oleg >