lives
lives

Reputation: 1195

kafka automatic deletion based on message consumption

Like how we have in MQ solutions , is it possible to have the message automatically deleted in Kafka once it is consumed ?

As I don't have control when the message will be consumed ,its not possible to define retention by time / byte size

Upvotes: 0

Views: 28

Answers (1)

Ran Lupovich
Ran Lupovich

Reputation: 1831

You can override the configuration of retention by time per topic basis, even set it to 0 for no deletion at all. Retention byte size retention is not limited by default, and you don't have to use it. Being said that I am not sure Kafka is best suited for your use case as it meant to use used for real time high performance streaming processes... another note you can use COMPACT topic and send tombstone message to delete a record once processed, but basically kafka does not have automatic delete on consumption

Upvotes: 1

Related Questions