Created
January 3, 2022 22:17
-
-
Save polster/a0f7c012a481ebca9a4e9d4e56e6eb39 to your computer and use it in GitHub Desktop.
Kafka topics creation per make
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!make | |
KAFKA_BOOTSTRAP_SERVER=localhost:9092 | |
KAFKA_TOPICS_FILE=./config/kafka/topics.txt | |
kafka-topics-create: | |
awk -F':' '{ system("kafka-topics.sh --create --bootstrap-server ${KAFKA_BOOTSTRAP_SERVER} --topic="$$1" --partitions="$$2" --replication-factor="$$3" --config="$$4) }' \ | |
${KAFKA_TOPICS_FILE} | |
.PHONY: kafka-topics-create |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Explanation: topic name, partition count to be a multiple of the number of stream threads, replication count, policy | |
person-changed-events:10:1:cleanup.policy=compact | |
address-changed-events:10:1:cleanup.policy=compact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment