A retry can follow an ambiguous acknowledgment: the broker may have appended the record even though the client did not receive the response. Idempotence lets the broker recognize a repeated producer request through its identity and sequence. It does not deduplicate two distinct business events with different sequences. The guarantee also does not make an external database write atomic with Kafka. These exercises retry one request within one producer session. Keep the producer identity and sequence unchanged, enable idempotence and inspect the log for a single record. The local sequence flag exposes a protocol concept for teaching; a normal client library manages these sequence numbers internally.
Inspect the topics, partition logs and group offsets before changing the cluster.