kafka에서 retention.ms 수정하는 방법은 다음 예처럼 간단한다. 


$ ./bin/kafka-topics.sh  --create  --zookeeper zkserver -replication-factor 1 --partitions 1 --topic samuel.test


$ ./bin/kafka-topics.sh  --describe --zookeeper zkserver --topic samuel.test

Topic:samuel.test PartitionCount:1 ReplicationFactor:1 Configs:

Topic: samuel.test Partition: 0 Leader: 25 Replicas: 25 Isr: 25

$ ./bin/kafka-topics.sh --zookeeper zkserver --alter --topic samuel.test --config retention.ms=86400000



$ ./bin/kafka-topics.sh  --describe --zookeeper zkserver --topic samuel.test

Topic:samuel.test PartitionCount:1 ReplicationFactor:1 Configs:retention.ms=86400000

Topic: samuel.test Partition: 0 Leader: 25 Replicas: 25 Isr: 25

Posted by 김용환 '김용환'