changing kafka retention period during runtime

后端 未结 4 814
借酒劲吻你
借酒劲吻你 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

    I tested and used this command in kafka confluent V4.0.0 and apache kafka V 1.0.0 and 1.0.1

    /opt/kafka/confluent-4.0.0/bin/kafka-configs --zookeeper XX.XX.XX.XX:2181 --entity-type topics --entity-name test --alter --add-config  retention.ms=55000
    

    test is the topic name.

    I think it works well in other versions too

提交回复
热议问题