[jira] [Commented] (KAFKA-5687) Retention settings are inconsistent between broker and topic
[ https://issues.apache.org/jira/browse/KAFKA-5687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16567628#comment-16567628 ] Ray Chiang commented on KAFKA-5687: --- I think there's a misreading in the docs here. The logic more or less works as follows. 1) If you need retention on a per-topic basis, use the retention.ms property on that topic. 2) If there is no retention value on a topic, then the broker uses the retention.ms property. Since it's a long, it can be set between 0 and Long.MaxValue (in ms). 3) If log.retention.ms is not set, the broker looks for the log.retention.minutes property. 4) If neither property is set in 3) above, then look at the log.retention.hours property. So, as you can see, the properties override each other--the properties are not additive. If you need anything finer than 1 minute resolution, use the log.retention.ms property. Otherwise, you can find an equivalent value in ms, for example: A) Setting log.retention.hours=168 B) Setting log.retention.minutes=10080 (i.e. 168*60) C) Setting log.retention.ms=60480 (i.e. 168*60*60*1000) are all equivalent settings from the point of broker log retention (1 week). > Retention settings are inconsistent between broker and topic > > > Key: KAFKA-5687 > URL: https://issues.apache.org/jira/browse/KAFKA-5687 > Project: Kafka > Issue Type: Bug > Components: log >Reporter: Ivan Babrou >Priority: Major > Attachments: screenshot-1.png, screenshot-2.png > > > Topic configurations: > * retention.ms > Broker configurations: > * log.retention.hours > * log.retention.minutes > * log.retention.ms > First of all, it's impossible to set topic retention time in hours or > minutes. Second, "seconds" version is missing between "ms" and "minutes". -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KAFKA-5687) Retention settings are inconsistent between broker and topic
[ https://issues.apache.org/jira/browse/KAFKA-5687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16109114#comment-16109114 ] Ivan Babrou commented on KAFKA-5687: By "impossible" I mean "not documented". In the docs: * Topic level retention settings: !screenshot-2.png|width=700! * Broker level retention settings: !screenshot-1.png|width=700! > Retention settings are inconsistent between broker and topic > > > Key: KAFKA-5687 > URL: https://issues.apache.org/jira/browse/KAFKA-5687 > Project: Kafka > Issue Type: Bug >Reporter: Ivan Babrou > Attachments: screenshot-1.png, screenshot-2.png > > > Topic configurations: > * retention.ms > Broker configurations: > * log.retention.hours > * log.retention.minutes > * log.retention.ms > First of all, it's impossible to set topic retention time in hours or > minutes. Second, "seconds" version is missing between "ms" and "minutes". -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (KAFKA-5687) Retention settings are inconsistent between broker and topic
[ https://issues.apache.org/jira/browse/KAFKA-5687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16109076#comment-16109076 ] Ismael Juma commented on KAFKA-5687: What do you mean by "impossible". You are saying it doesn't work? > Retention settings are inconsistent between broker and topic > > > Key: KAFKA-5687 > URL: https://issues.apache.org/jira/browse/KAFKA-5687 > Project: Kafka > Issue Type: Bug >Reporter: Ivan Babrou > > Topic configurations: > * retention.ms > Broker configurations: > * log.retention.hours > * log.retention.minutes > * log.retention.ms > First of all, it's impossible to set topic retention time in hours or > minutes. Second, "seconds" version is missing between "ms" and "minutes". -- This message was sent by Atlassian JIRA (v6.4.14#64029)