idler1515
idler1515

Reputation: 150

Is there a better way to edit kafka topics with its message expiration interval?

with the golang library sarama, is there a way to create a topic with a specific expiration time (for messages)?

And later that we can edit it, without deleting and recreating the topic?

Upvotes: 1

Views: 426

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191844

A ClusterAdmin client can create topics that have TopicDetails containing a map of config entries, of which you can set the retention period

You can later edit it with AlterConfigsRequest

Upvotes: 2

Related Questions