Skip to content

Instantly share code, notes, and snippets.

@Alfex4936
Created December 31, 2020 05:23
Show Gist options
  • Save Alfex4936/4965b4ae24b63e839c6d8e7628deeee1 to your computer and use it in GitHub Desktop.
Save Alfex4936/4965b4ae24b63e839c6d8e7628deeee1 to your computer and use it in GitHub Desktop.
Confluent Kafka Connect Connection Check (From Zero to Hero with Kafka Connect)
bash -c ' \
echo -e "\n\n=============\nWaiting for Kafka Connect to start listening on localhost\n=============\n"
while [ $(curl -s -o /dev/null -w %{http_code} http://localhost:8083/connectors) -ne 200 ] ; do
echo -e "\t" $(date) " Kafka Connect listener HTTP state: " $(curl -s -o /dev/null -w %{http_code} http://localhost:8083/connectors)
" (waiting for 200)"
sleep 5
done
echo -e $(date) "\n----------\n\o/ Kafka Connect is ready! Listener HTTP state: " $(curl -s -o /dev/null -w %{http_code} http://localhost:8083/connectors) "\n----------\n"
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment