Sheena
Sheena

Reputation: 117

Apache Kafka - get messages that should be deleted

Hay there,

today i spoke with a colleague of mine and we stumbled over a question dealing with the expired messages in a Kafka-topic. We were wondering if there was a way to get the messages that are "marked" for deletion due to an expired retention-timer.

Like at the moment when a message is deleted, a component receives an information about the message.

Is there any way to do something like this? Since this question is just out of curiosity I don't have any good example.

Thanks in advance!

Upvotes: 0

Views: 39

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191844

The best you can do is to parse each of the LogCleaner logs on the broker (meaning you need to de-dupe by topic and partition) to know when a segment on each broker is about to be removed

There's no way to know when individual messages will be deleted without dumping the log segments

Upvotes: 1

Related Questions