For details of how this works, see this blog (and take note of possible problems you might encounter).
To use this you need to create an ngrok account and add a file called .env
in this folder with the following entry:
NGROK_AUTH_TOKEN=<your_token>
Bring up the Kafka and ngrok stack with
docker compose up
Once up, find out your Kafka broker host/post that is available on the internet:
curl -s localhost:4040/api/tunnels | jq -r '.tunnels[0].public_url' | sed 's/tcp:\/\///g'
Warning
|
There is NO SECURITY defined on this Kafka cluster. Anyone scanning the ngrok address/port may find this and be able to access your data. |
kcat is included.