wiki地址:
<1> http://kafka.apache.org/07/quickstart.html;
<2>http://kafka.apache.org/documentation.htm;
启动kafka:bin/kafka-server-start.shconfig/server.properties
写kafka:bin/kafka-console-producer.sh--zookeeper localhost:2181 --topic test
读kafka:bin/kafka-console-consumer.sh--zookeeper localhost:2181 --topic test --from-beginning
配置文件:server.properties(日志保留的时间设置,全局和topic):
| log.retention.hours | 24 * 7 | The number of hours to keep a log segment before it is deleted, i.e. the default data retention window for all topics. Note that if both log.retention.hours and log.retention.bytes are both set we delete a segment when either limit is exceeded. |
| log.retention.hours.per.topic | "" | A per-topic override for log.retention.hours. |
本文介绍如何启动Kafka服务,使用命令行工具进行消息的生产和消费,并详细解释了Kafka配置文件中关于日志保留时间的设置方法。
2330

被折叠的 条评论
为什么被折叠?



