http://kafka.apache.org/0101/documentation.html
1、Kafka 存储数据是有期限的.
The Kafka cluster retains all published records—whether or not they have been consumed—
using a configurable retention period. For example, if the retention policy is set to two
days, then for the two days after a record is published, it is available for consumption,
after which it will be discarded to free up space. Kafka's performance is effectively
constant with respect to data size so storing data for a long time is not a problem.
log.retention.ms 毫秒
log.retention.hours 默认值是168小时
log.retention.minutes 分钟
这三个参数的作用是一样的,都是决定消息多久以后会被删除,不过还是推荐使用log.retention.ms 。如果指定了不止一个参数,Kafka会优先使用具有最小值的那个参数.
2、自动创建主题