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. |