Middle
Can a Kafka message have a Retention Time of -1?
sobes.tech AI
Answer from AI
In Apache Kafka, messages do not have a separate Retention Time parameter. The data retention period is set at the topic level through the retention.ms parameter. A value of -1 for retention.ms means that messages are stored indefinitely, i.e., without automatic deletion based on time. Therefore, a message's Retention Time cannot be directly set to -1, but a topic can have retention.ms = -1, which affects all messages in that topic.