Adding to Xiao , If you are using a low level consumer (simple consumer),
then for scenario #1 consumer will get OffsetOutOfRange error with error
code 1.
Please find more details at this
<https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol>
link

Thanks,

_NIpur



On Mon, May 25, 2015 at 2:30 PM, tao xiao <xiaotao...@gmail.com> wrote:

> The default behavior of high level consumer is to wait until next message
> come along. If you want to change this behavior you can change the consumer
> setting consumer.timeout.ms to some value that is greater than -1
>
> On Mon, 25 May 2015 at 16:57 Ganesh Nikam <ganesh.ni...@gslab.com> wrote:
>
> > HI All,
> >
> > I have basic question on kafka partition. Lets say I have one topic with
> > partition 0. There is one producer which is producing log messages for
> > this topic and there is one consumer also which is consuming messages on
> > this topic. Assuming consumer is faster, after some time it reaches to
> > the last message on the partition. Now the questions are:
> >      1. If the consumer tries to fetch next message, then what value
> > will be return by Kafka server to consumer for offset ?
> >
> >      2. If I want my consumer to wait till producer sends next log
> > message then how can I achieve this ? How can I make my consumer to wait
> > for next message ?
> >
> >
> > - Ganesh
> >
>

Reply via email to