flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aljoscha Krettek <aljos...@apache.org>
Subject Re: Replays message in Kafka topics with FlinkKafkaConsumer09
Date Fri, 22 Apr 2016 09:14:46 GMT
Hi,
I think the "auto.offset.reset" parameter is only used if your consumer
never read from a topic. To simulate being a new consumer you can set "
group.id" property to a new random value.

Cheers,
Aljoscha



On Fri, 22 Apr 2016 at 03:10 Jack Huang <jackhuang@machinezone.com> wrote:

> Hi all,
>
> I am trying to force my job to reprocess old messages in my Kafka topics
> but couldn't get it to work. Here is my FlinkKafkaConsumer09 setup:
>
> val kafkaProp = new Properties()
> kafkaProp.setProperty("bootstrap.servers", "localhost:6667")
> kafkaProp.setProperty("auto.offset.reset", "earliest")
>
> env.addSource(new FlinkKafkaConsumer09[String](input, new SimpleStringSchema, kafkaProp))
>     .print
>
> ‚Äč
>
> I thought *auto.offset.reset* is going to do the trick. What am I missing
> here?
>
>
> Thanks,
>
> Jack Huang
>

Mime
View raw message