Hello guys, one question about kafka offset and savepoint. Can you confirm that I change kafka consumer group name of a flink job and start with the savepoint generated by old flink job. I can't re-use the offset information saved in that savepoint, right? Or we don't really keep kafka offsets at all in savepoint ?
s
sap1ens
03/08/2023, 3:11 PM
Hi! Kafka offsets are stored in a savepoint. Consumer group name is pretty irrelevant, operator uid is the only important thing for recovery. So, you should be able to use the same savepoint with a different consumer group name as long as the operator uid hasn’t changed.
🤔 1
y
Yang LI
03/08/2023, 9:01 PM
Hello @sap1ens, I am really not sure, I didn't change uuid of my kafka source operator. I have just created a savepoint in flink 16, and use it to start a new flink job with a new consumer group. But I see clearly it does not use the offset of old consumer group
s
sap1ens
03/08/2023, 9:32 PM
Do you use Table API or DataStream API? If it’s the latter, did you define
uid
for the source?
y
Yang LI
03/09/2023, 8:30 AM
I have used KafkaSource API https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/datastream/kafka/ , I have defined uid for this source,
the thing is , if I don't change consumer group, I think kafka consumer offsets will kept
But when I change consumer group (ex: a consumer group not exist yet). My flink job can not set consumer offsets itself I think
Yang LI
03/09/2023, 8:31 AM
BTW do I need to configure something like admin permission for my kafka client ? that I didn't do indeed