HiveMQ Enterprise Extension for Docker

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.

  1. Create a file named Dockerfile in the same folder you have kafka-configuration.xml with the following contents

ARG TAG=latest

FROM hivemq/hivemq4:${TAG}

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

  1. Now build the container image using the docker build command. You will need to go to folder where you have Dockerfile

$ docker build -t (image name) .

  1. Run your container using the docker run command 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.

Kind regards,
Sheetal from HiveMQ team