changing kafka retention period during runtime

后端 未结 4 828
借酒劲吻你
借酒劲吻你 2020-12-12 14:56

With Kafka 0.8.1.1, how do I change the log retention time while it\'s running? The documentation says the property is log.retention.hours, but trying to change

4条回答
  •  情书的邮戳
    2020-12-12 15:34

    The correct config key is retention.ms

    $ bin/kafka-topics.sh --zookeeper zk.prod.yoursite.com --alter --topic as-access --config retention.ms=86400000
    Updated config for topic "my-topic".
    

提交回复
热议问题