Sha256: c905886eead08254ee6e9d6c210d61cc9490cb5090427bc990b0784f42506ec8
Contents?: true
Size: 692 Bytes
Versions: 9
Compression:
Stored size: 692 Bytes
Contents
#!/bin/bash # This script allows us to wait for Kafka docker to fully be ready # We consider it fully ready when all our topics that need to be created are created as expected KAFKA_NAME='karafka_20_kafka' ZOOKEEPER='zookeeper:2181' LIST_CMD="kafka-topics.sh --list --zookeeper $ZOOKEEPER" # Take the number of topics that we need to create prior to running anything TOPICS_COUNT=`cat docker-compose.yml | grep -E -i 'integrations_|benchmarks_' | wc -l` # And wait until all of them are created until (((`docker exec $KAFKA_NAME $LIST_CMD | wc -l`) >= $TOPICS_COUNT)); do echo "Waiting for Kafka to create all the needed topics..." sleep 1 done echo "All the needed topics created."
Version data entries
9 entries across 9 versions & 1 rubygems