I'm new with Apache Flink. I've tried to get Events from Apache Kafka using the KafkaSource from Flink. So far so good, it seems to work fine. After restarting the flink task, I've got the same messages again, though I've set the GroupId.
Here is my Code-Snippet to read from the Kafka:
KafkaSource<BestellungEvent> bestellungEventSource = KafkaSource.<BestellungEvent>builder() .setBootstrapServers("localhost:9092") .setTopics("bestellungen") .setGroupId("bla2") .setStartingOffsets(OffsetsInitializer.earliest()) .setDeserializer(KafkaRecordDeserializationSchema.of(new BestellungEventKeyValueDeserializationSchema())) .build();
Can anybody help me with this problem?
Best Regards
Thomas