I installed HiveMQ docker and trying to connect to kafka. Surprisingly I don’t find options to configure in docker. I ma new to this and any help is highly appreciated
Welcome to the HiveMQ Community forum. Glad to see you’re taking interest in HiveMQ and MQTT.
HiveMQ 4.4 version onwards HiveMQ Enterprise Extension for Kafka extension is shipped by default with the broker.
You can make changes in the kafka-configuration.xml file locally and move those to docker by deploying with the docker file.
- Create a file named
Dockerfilein the same folder you have
kafka-configuration.xmlwith the following contents
COPY --chown=hivemq:hivemq kafka-configuration.xml /opt/hivemq/extensions/hivemq-kafka-extension/kafka-configuration.xml
RUN rm /opt/hivemq/extensions/hivemq-kafka-extension/DISABLED
- Now build the container image using the
docker buildcommand. You will need to go to folder where you have Dockerfile
$ docker build -t (image name) .
- Run your container using the
docker runcommand and specify the name of the image we just created:
$ docker run -p 1883:1883 ( image name)
You can confirm by checking the container terminal if files are copied correctly similarly you can check logs to confirm the broker is started without errors.
I hope this helps.
Sheetal from HiveMQ team