Reputation: 523
I am trying to limit log size for a kafka topic.
I followed the kafka documentation(Kafka 0.10.0 Documentation) and set these two property cleanup.policy=delete,retention.bytes=1.
--> result of topic describe command
./kafka-topics.sh --describe --zookeeper localhost:2181 --topic kafkatest1 Topic:kafkatest1 PartitionCount:3
ReplicationFactor:1
Configs:cleanup.policy=delete,retention.bytes=1
I was expecting that whatever message i am writing to topic 'kafkatest1' will get deleted automatically since i have set retention.bytes to 1. but messages are keep getting appended.
Is there any additional configuration is required to achieve this?
Upvotes: 2
Views: 2279
Reputation: 2921
Please check your log.segment.bytes
(the default is 1073741824 bytes). As far as I know the retention will be taken into account when a log segment is rolled.
Could you explain what you are trying to a achieve? Why sending a message to delete it?
Upvotes: 0