You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Chris Helck <Ch...@ebs.com> on 2014/05/05 14:28:42 UTC

Consumer's Group.id and autooffset.reset

Would some one explain the interplay between the group.id and autooffset.reset config parameters? I wrote a simple Consumer that had

    group.id =  "XYZZY"
    autooffset.reset = smallest

My intention was to write something similar to Kafka's ConsoleConsumer; that each time my Consumer ran, it would start at the beginning and read all of the messages available. I discovered that it only read the messages the first time, and that I need to change the group.id and reset to smallest.

A general question is why?
A specific question is: What are use cases where I would change the group.id, what are use cases where I want it to remain the same?

Thanks,
C. Helck

**********************************************************************
This communication and all information contained in or attached to it (including, but not limited to market prices/levels and market commentary) (the “Information”) is for informational purposes only, is confidential, may be legally privileged and is the intellectual property of one of the companies of ICAP plc group (“ICAP”) or third parties. The Information is not, and should not be construed as, an offer, bid, recommendation or solicitation in relation to any financial instrument or investment or to participate in any particular trading strategy. The Information is not to be relied upon and is not warranted, including, but not limited, as to completeness, timeliness or accuracy and is subject to change without notice. All representations and warranties are expressly disclaimed. Access to the Information by anyone other than the intended recipient is unauthorised and any disclosure, copying or redistribution is prohibited. If you receive this message in error, please immediately delete all copies of it and notify the sender. For further information, please see ebs.com.
**********************************************************************
---------------------------------------------------------------------------------------
 This email has been scanned for email related threats and delivered safely by Mimecast.
 For more information please visit http://www.mimecast.com
---------------------------------------------------------------------------------------



Re: Consumer's Group.id and autooffset.reset

Posted by Guozhang Wang <wa...@gmail.com>.
Hi Chris,

The reason that it does not read from the beginning after the first time is
probably due to offset commit. Could you check if you set the config

auto.commit.enable

to true? Setting it to false would solve your problem that you do not need
to change to a new group.id everytime.

Guozhang


On Mon, May 5, 2014 at 5:28 AM, Chris Helck <Ch...@ebs.com> wrote:

> Would some one explain the interplay between the group.id and
> autooffset.reset config parameters? I wrote a simple Consumer that had
>
>     group.id =  "XYZZY"
>     autooffset.reset = smallest
>
> My intention was to write something similar to Kafka's ConsoleConsumer;
> that each time my Consumer ran, it would start at the beginning and read
> all of the messages available. I discovered that it only read the messages
> the first time, and that I need to change the group.id and reset to
> smallest.
>
> A general question is why?
> A specific question is: What are use cases where I would change the
> group.id, what are use cases where I want it to remain the same?
>
> Thanks,
> C. Helck
>
> **********************************************************************
> This communication and all information contained in or attached to it
> (including, but not limited to market prices/levels and market commentary)
> (the “Information”) is for informational purposes only, is confidential,
> may be legally privileged and is the intellectual property of one of the
> companies of ICAP plc group (“ICAP”) or third parties. The Information is
> not, and should not be construed as, an offer, bid, recommendation or
> solicitation in relation to any financial instrument or investment or to
> participate in any particular trading strategy. The Information is not to
> be relied upon and is not warranted, including, but not limited, as to
> completeness, timeliness or accuracy and is subject to change without
> notice. All representations and warranties are expressly disclaimed. Access
> to the Information by anyone other than the intended recipient is
> unauthorised and any disclosure, copying or redistribution is prohibited.
> If you receive this message in error, please immediately delete all copies
> of it and notify the sender. For further information, please see ebs.com.
> **********************************************************************
>
> ---------------------------------------------------------------------------------------
>  This email has been scanned for email related threats and delivered
> safely by Mimecast.
>  For more information please visit http://www.mimecast.com
>
> ---------------------------------------------------------------------------------------
>
>
>


-- 
-- Guozhang