Hi Maxim,

I had a quick look, it seems like that was added to the Apache Kafka
documentation only in version 1.1.1, which didn't get a doc update being
only a patch version, so the relevant sentence is only in the docs for 2.0
[1].
Additionally, the passage was only added to the docs of the topic level
setting, not for the broker setting, in case you checked there, that is why
you didn't see it :)

I've created a pull request to add this to the broker level setting as well.

Hope that helps?

Best regards,
Sönke

[1] https://kafka.apache.org/20/documentation.html#topicconfigs


On Mon, Mar 18, 2019 at 7:24 PM Maxim Kheyfets <maxim.kheyf...@clearme.com>
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
>
> maxim.kheyf...@clearme.com | www.clearme.com
>


-- 
Sönke Liebau
Partner
Tel. +49 179 7940878
OpenCore GmbH & Co. KG - Thomas-Mann-Straße 8 - 22880 Wedel - Germany

Reply via email to