I am using spark structured streaming to consume data from kafka topic and write the data into another kafka sink.
I want to store the offset twice - once when reading from the topic and stire the offset. Secondly- when writing the data onto output sink and write the offset, which is possible by giving checkpoint directory location ,
Is it possible to write the offset consumed during subscribing the topic.