Resetting the last seen epoch of partition

These are INFO messages logged in the producer log.

Sample log message as below.

2023-05-05 09:26:29.477 INFO 1 — [ad | producer-1] org.apache.kafka.clients.Metadata : [Producer clientId=producer-1]
Resetting the last seen epoch of partition topic.name-0 to 6 since the associated topicId changed from null to 6zB3byhITIaqmS6SfM3OQQ

When a client first try to consume/produce from/to a topic, it will initialise an object in memory to track the topic metadata, and upon the first metadata response received from the kafka cluster.It will update its state from the default null to the actual topic ID.

If you delete and recreate a topic using the same name, the topic ID will also change and you will see an actual topicId instead of null in the message when the client refreshes its metadata.