diff --git a/README.md b/README.md index 161672d..ae7afe9 100644 --- a/README.md +++ b/README.md @@ -189,6 +189,11 @@ with their default values, if any: will create the path in ZK automatically; with earlier versions, you must ensure it is created before starting brokers. +- `KAFKA_UNCLEAN_LEADER_ELECTION=(true|false)`, Default here: `false` + Favour availability over consistency by allowing a non-ISR replica to become + a leader for a partition, possibly losing writes. Disabled by default from + version `0.11.0.0` + JMX --- diff --git a/config/server.properties.template b/config/server.properties.template index fd30e75..c9905c9 100644 --- a/config/server.properties.template +++ b/config/server.properties.template @@ -76,5 +76,6 @@ inter.broker.protocol.version={{KAFKA_INTER_BROKER_PROTOCOL_VERSION}} log.message.format.version={{KAFKA_LOG_MESSAGE_FORMAT_VERSION}} message.max.bytes={{KAFKA_MESSAGE_MAX_BYTES}} replica.fetch.max.bytes={{KAFKA_REPLICA_FETCH_MAX_BYTES}} +unclean.leader.election.enable={{KAFKA_UNCLEAN_LEADER_ELECTION}} # vim:set filetype=jproperties diff --git a/start.sh b/start.sh index b5bd81e..9459e4f 100755 --- a/start.sh +++ b/start.sh @@ -30,6 +30,7 @@ cat /kafka/config/server.properties.template | sed \ -e "s|{{ZOOKEEPER_SESSION_TIMEOUT_MS}}|${ZOOKEEPER_SESSION_TIMEOUT_MS:-10000}|g" \ -e "s|{{KAFKA_MESSAGE_MAX_BYTES}}|${KAFKA_MESSAGE_MAX_BYTES:-1000012}|g" \ -e "s|{{KAFKA_REPLICA_FETCH_MAX_BYTES}}|${KAFKA_REPLICA_FETCH_MAX_BYTES:-1048576}|g" \ + -e "s|{{KAFKA_UNCLEAN_LEADER_ELECTION}}|${KAFKA_UNCLEAN_LEADER_ELECTION:-false}|g" \ > /kafka/config/server.properties # Kafka's built-in start scripts set the first three system properties here, but