Google News
logo
Kafka - Interview Questions
How can you get exactly-once messaging from Kafka during data production?
To get exactly-once messaging during data production from Kafka, we must follow the two things avoiding duplicates during data consumption and avoiding duplication during data production.
 
Following are the two ways to get exactly one semantics while data production :
 
* Avail a single writer per partition. Whenever you get a network error, you should check the last message in that partition to see if your last write succeeded.

* In the message, include a primary key (UUID or something) and de-duplicate on the consumer.
Advertisement