You would like to configure Apache Kafka on Heroku to have indefinite retention of messages in a topic.
It is possible to configure a topic in Apache Kafka on Heroku to have indefinite retention of messages, a long as the following conditions are met:
- You are using a single-tenant cluster (https://devcenter.heroku.com/articles/kafka-on-heroku#plans-and-configurations), rather than a multi-tenant cluster (our
- Time-based retention is disabled for the topic (
heroku kafka:topics:retention-time my-topic disable)
- Compaction is enabled for the topic (
heroku kafka:topics:compaction enable)
- Total size of all topics does not exceed the storage capacity for your plan.