Alter retention.ms property for kafka topic deletes the old data -


i trying change retention.ms property existing topic, per analysis deletes existing data inside topic.

scenarios:- topic name "topic1" retention 5 mins , contains data.

use case 1 - change retention higher period change retention.ms value 8 mins using below command:-

 bin/kafka-topics.sh --alter --zookeeper localhost:2181     --topic topic1 --config retention.ms=8 

but deletes old data topic. after pushed more data topic.

use case 2 - change retention lower period change retention.ms value 3 mins using below command:-

 bin/kafka-topics.sh --alter --zookeeper localhost:2181     --topic topic1 --config retention.ms=3 

it deletes previous data topic.

could please tell me exact behavior same.

any tips appreciated!

retention.ms property in kafka takes milliseconds. changing retention period 8 , 3 milliseconds respectively. have give 480000 if want set 8 mins retention period.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -