My Kafka is not getting any messages
Problem
HiveMQ Cloud cannot connect to your Kafka cluster. This issue often manifests as:
No messages arriving in Kafka from MQTT
Timeout or connection errors in HiveMQ extensions
Errors during connector setup or runtime logs showing "connection refused" or "host unreachable"
Solution
The most common root cause is that your Kafka cluster is not reachable over the public internet. HiveMQ Cloud – particularly the Starter and Serverless (Free/PayG) tier – needs to access your Kafka cluster via public IP or DNS.
To verify if your Kafka cluster is publicly reachable, use the kafkacat CLI tool from a public network (e.g., a cloud-hosted VM or your local machine without VPN restrictions).
Install kafkacat (or
kcat, its successor):macOS:
brew install kafkacatLinux (Debian/Ubuntu):
sudo apt install kafkacatDocker:
docker run -it edenhill/kcat
Run the connection test:
kafkacat -b <your-kafka-bootstrap-server>:<port> -LReplace
<your-kafka-bootstrap-server>with your Kafka broker's address (e.g.,kafka.mycompany.com:9092).Example:
kafkacat -b kafka.mycompany.com:9092 -LWhat to look for:
If you see broker and topic metadata: Kafka is reachable.
If you see errors like
Connection refusedorName or service not known: Kafka is not accessible from the internet.