Proper recovery of KSQL target stream to preserve offset for Connector to avoid duplicate records

Viewed 22

We recently adopted Kafka Streams via KSQL to convert our source JSON topics into AVRO so that our S3 Sink Connector can store the data into Parquet format in their respective buckets.

Our Kafka cluster was taken down over the weekend and we've noticed that some of our target streams (avro) have no data, yet all of our source streams do (checked via print 'topic_name'; with ksql).

I know that I can drop the target stream and recreate it but will that lose the offset and duplicate records in our Sink?

Also, I know that if I recreate the target stream with the same topic name, I may run into the "topic already exists, with different partition/offset.." thus I am hesitant to try this.

So what is the best way to recreate/recover our target streams such that we preserve the topic name and offset for our Sink Connector?

Thanks.

0 Answers
Related