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
'kafka' 카테고리의 다른 글
[kafka] enable.auto.commit , auto.commit.interval.ms (0) | 2018.10.22 |
---|---|
[kafka] lag 생긴다고 파티션 추가하는 것에 대해 (0) | 2018.08.31 |
[kafka] java.io.IOException: Connection to 1 was disconnected before the response was read 에러 (0) | 2018.01.18 |
[kafka] 카프카 성능 튜닝 링크 (0) | 2018.01.10 |
kafka 토픽 삭제 관련 예제 (0) | 2017.12.06 |