Please note, as of the current writing Kafka is not clever enough to clear messages once they are read by any one consumer. This needs to be done manually by the User. So do make sure that you have a setting that fits your purpose. i.e your consumers should be able to read it before the message is deleted from Kafka. Once a message is deleted from Kafka there is no way to get it back.
The current default for Kafka messages in a Topic is 7 Days.
Here we are changing this to 1 day.
cd /usr/local/kafka/kafka_2.11-0.10.1.0/bin
./kafka-topics.sh --zookeeper zookeeper1:2181 --alter --topic yourtopicname --config retention.ms=86400000
No comments:
Post a Comment