Hi, Working on a kafka project I'm trying to set up Integration test using docker to have Zookeeper and Kafka clusters and my client(s) program and some kafkacat clients on a docker network.
To set up this work context I need to script each action and I guess I have a beginner problem about Zookeeper and Kafka startup. If I do : /zookeeper-server-start.sh ../config/zookeeper.properties & /kafka-server-start.sh ../config/server.properties & kafkacat -P -c 10 -b my.broker -t myTopic < myMessages.txt then kafka sometimes fails to start because zookeeper boot process isn't completely finished yet, and kafkatcat always fails to produce because kafka broker starting process in isn't completely finished neither. Is there a way to starts these as a service (a parameter ?), which give back the control of the shell only when the starting process is completed and Zookeeper/Kafka ready to use. Alternatively do you think that loop checking TCP connection until accept, on Zookeeper / Kafka client serving port would be a good way to consider that these two process are ready to serve clients ? Thank you.