Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Allow delete topics #78

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions kafka/scripts/start-kafka.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh

# Optional ENV variables:
# * ALLOW_DELETE_TOPICS: adds delete.topic.enable=true to server.properties
# * ADVERTISED_HOST: the external ip for the container, e.g. `docker-machine ip \`docker-machine active\``
# * ADVERTISED_PORT: the external port for Kafka, e.g. 9092
# * ZK_CHROOT: the zookeeper chroot that's used by Kafka (without / prefix), e.g. "kafka"
Expand Down Expand Up @@ -71,5 +72,13 @@ if [ ! -z "$AUTO_CREATE_TOPICS" ]; then
echo "auto.create.topics.enable=$AUTO_CREATE_TOPICS" >> $KAFKA_HOME/config/server.properties
fi

# Enable/disable topics deletion
if [ ! -z "$ALLOW_DELETE_TOPICS" ]; then
echo "delete.topic.enable: $ALLOW_DELETE_TOPICS"
echo "delete.topic.enable=$ALLOW_DELETE_TOPICS" >> $KAFKA_HOME/config/server.properties
fi



# Run Kafka
$KAFKA_HOME/bin/kafka-server-start.sh $KAFKA_HOME/config/server.properties