diff --git a/README.md b/README.md index 2540cd7..77cbf0c 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,7 @@ with their default values, if any: Maps to Kafka's `num.partitions` setting. The default number of log partitions per topic. + - `KAFKA_AUTO_CREATE_TOPICS_ENABLE=true` Maps to Kafka's `auto.create.topics.enable`. @@ -145,6 +146,10 @@ with their default values, if any: Maps to Kafka's `log.retention.hours`. The number of hours to keep a log file before deleting it. +- `KAFKA_OFFSETS_RETENTION_MINUTES=1440` + + Maps to Kafka's `offsets.retention.minutes`. The number of minutes to keep + an offset for a consumer group before deleting it. - `JAVA_RMI_SERVER_HOSTNAME=$KAFKA_ADVERTISED_HOST_NAME` Maps to the `java.rmi.server.hostname` JVM property, which is used to bind the diff --git a/config/server.properties.template b/config/server.properties.template index 154cc60..2350c2e 100644 --- a/config/server.properties.template +++ b/config/server.properties.template @@ -74,5 +74,6 @@ controlled.shutdown.enable=true group.max.session.timeout.ms={{KAFKA_GROUP_MAX_SESSION_TIMEOUT_MS}} inter.broker.protocol.version={{KAFKA_INTER_BROKER_PROTOCOL_VERSION}} log.message.format.version={{KAFKA_LOG_MESSAGE_FORMAT_VERSION}} +offsets.retention.minutes={{KAFKA_OFFSETS_RETENTION_MINUTES}} # vim:set filetype=jproperties diff --git a/start.sh b/start.sh index 947b138..46cb6a7 100755 --- a/start.sh +++ b/start.sh @@ -22,6 +22,7 @@ cat /kafka/config/server.properties.template | sed \ -e "s|{{KAFKA_INTER_BROKER_PROTOCOL_VERSION}}|${KAFKA_INTER_BROKER_PROTOCOL_VERSION:-$KAFKA_VERSION}|g" \ -e "s|{{KAFKA_LOG_MESSAGE_FORMAT_VERSION}}|${KAFKA_LOG_MESSAGE_FORMAT_VERSION:-$KAFKA_VERSION}|g" \ -e "s|{{KAFKA_LOG_RETENTION_HOURS}}|${KAFKA_LOG_RETENTION_HOURS:-168}|g" \ + -e "s|{{KAFKA_OFFSETS_RETENTION_MINUTES}}|${KAFKA_OFFSETS_RETENTION_MINUTES:-1440}|g" \ -e "s|{{KAFKA_NUM_PARTITIONS}}|${KAFKA_NUM_PARTITIONS:-1}|g" \ -e "s|{{KAFKA_PORT}}|${KAFKA_PORT:-9092}|g" \ -e "s|{{ZOOKEEPER_CHROOT}}|${ZOOKEEPER_CHROOT:-}|g" \