https://www.cloudera.com/documentation/enterprise/properties/5-13-x/topics/cm_props_cdh5110_kafka.html
Mentions log.retention.ms: The maximum time before a new log segment is rolled out. If both log.retention.ms and log.retention.bytes are set, a segment is deleted when either limit is exceeded. The special value of -1 is interpreted as unlimited. This property is used in Kafka 1.4.0 and later in place of log.retention.hours. Regards, Harpreet On Mon, Mar 18, 2019 at 2:24 PM Maxim Kheyfets <[email protected]> wrote: > Good time of the day, > > We are using kafka 1.0.1, and want to create a permanent topic. One online > post suggests setting retention.ms and retention.bytes to -1. The sample > below shows system accepts -1 correctly, but I don't see this documented > anywhere explicitly in the official documentation. > > Could you confirm, and/or point me to the right official page? > > Thank you, > Maxim > > > kafka-topics.sh --create --zookeeper zk.local/kafka --replication-factor 3 > --partitions 30 --topic maxim-test > kafka-configs.sh --zookeeper zk.local/kafka --entity-type topics > --entity-name maxim-test --alter --add-config retention.ms=-1 > kafka-configs.sh --zookeeper zk.local/kafka --entity-type topics > --entity-name maxim-test --alter --add-config retention.bytes=-1 > > --describe shows it as successful: > zk.local > > Topic:maxim-test PartitionCount:30 ReplicationFactor:3 > Configs:retention.ms=-1,retention.bytes=-1 > Topic: msg-opt-in Partition: 0 Leader: 1 Replicas: 1,2,3 Isr: 1,2,3 Topic: > msg-opt-in Partition: 1 Leader: 2 Replicas: 2,3,1 Isr: 2,3,1 Topic: > msg-opt-in Partition: 2 Leader: 3 Replicas: 3,1,2 Isr: 3,1,2 Topic: > msg-opt-in Partition: 3 Leader: 1 Replicas: 1,3,2 Isr: 1,3,2 Topic: > msg-opt-in Partition: 4 Leader: 2 Replicas: 2,1,3 Isr: 2,1,3 Topic: > msg-opt-in Partition: 5 Leader: 3 Replicas: 3,2,1 Isr: 3,2,1 Topic: > msg-opt-in Partition: 6 Leader: 1 Replicas: 1,2,3 Isr: 1,2,3 Topic: > msg-opt-in Partition: 7 Leader: 2 Replicas: 2,3,1 Isr: 2,3,1 Topic: > msg-opt-in Partition: 8 Leader: 3 Replicas: 3,1,2 Isr: 3,1,2 Topic: > msg-opt-in Partition: 9 Leader: 1 Replicas: 1,3,2 Isr: 1,3,2 Topic: > msg-opt-in Partition: 10 Leader: 2 Replicas: 2,1,3 Isr: 2,1,3 Topic: > msg-opt-in Partition: 11 Leader: 3 Replicas: 3,2,1 Isr: 3,2,1 Topic: > msg-opt-in Partition: 12 Leader: 1 Replicas: 1,2,3 Isr: 1,2,3 Topic: > msg-opt-in Partition: 13 Leader: 2 Replicas: 2,3,1 Isr: 2,3,1 Topic: > msg-opt-in Partition: 14 Leader: 3 Replicas: 3,1,2 Isr: 3,1,2 Topic: > msg-opt-in Partition: 15 Leader: 1 Replicas: 1,3,2 Isr: 1,3,2 Topic: > msg-opt-in Partition: 16 Leader: 2 Replicas: 2,1,3 Isr: 2,1,3 Topic: > msg-opt-in Partition: 17 Leader: 3 Replicas: 3,2,1 Isr: 3,2,1 Topic: > msg-opt-in Partition: 18 Leader: 1 Replicas: 1,2,3 Isr: 1,2,3 Topic: > msg-opt-in Partition: 19 Leader: 2 Replicas: 2,3,1 Isr: 2,3,1 Topic: > msg-opt-in Partition: 20 Leader: 3 Replicas: 3,1,2 Isr: 3,1,2 Topic: > msg-opt-in Partition: 21 Leader: 1 Replicas: 1,3,2 Isr: 1,3,2 Topic: > msg-opt-in Partition: 22 Leader: 2 Replicas: 2,1,3 Isr: 2,1,3 Topic: > msg-opt-in Partition: 23 Leader: 3 Replicas: 3,2,1 Isr: 3,2,1 Topic: > msg-opt-in Partition: 24 Leader: 1 Replicas: 1,2,3 Isr: 1,2,3 Topic: > msg-opt-in Partition: 25 Leader: 2 Replicas: 2,3,1 Isr: 2,3,1 Topic: > msg-opt-in Partition: 26 Leader: 3 Replicas: 3,1,2 Isr: 3,1,2 Topic: > msg-opt-in Partition: 27 Leader: 1 Replicas: 1,3,2 Isr: 1,3,2 Topic: > msg-opt-in Partition: 28 Leader: 2 Replicas: 2,1,3 Isr: 2,1,3 Topic: > msg-opt-in Partition: 29 Leader: 3 Replicas: 3,2,1 Isr: 3,2,1 > > > -- > > > > > *Maxim Kheyfets* > Senior DevOps Engineer > > [email protected] | www.clearme.com > -- Regards, Harpreet Singh 647-309-6132
