Skip to content

An example customization project for the HiveMQ Enterprise Extension for Kafka using the HiveMQ Kafka Extension Customization SDK.

License

Notifications You must be signed in to change notification settings

hivemq/hivemq-kafka-hello-world-customization

Repository files navigation

HiveMQ Kafka Extension Hello World Customization

Extension Type GitHub release (latest by date) GitHub

Purpose

This Hello World customization uses a Mqtt-to-Kafka transformer which forwards MQTT PUBLISHES to a Kafka cluster. It maps the MQTT topic structure to a matching Kafka topic structure and preserves MQTT 5 user properties as Kafka record headers.

We strongly recommend reading the HiveMQ Enterprise Extension for Kafka Documentation to grasp the core concepts of HiveMQ Kafka customization development.

Installation

  1. Clone this repository into a Java 11 gradle project.

  2. Run ./gradlew jar task from gradle to build the customization.

  3. Move the file: "build/libs/hivemq-kafka-hello-world-customization-4.30.0.jar" to the directory: "HIVEMQ_HOME/extensions/hivemq-kafka-extension/customizations"

  4. Copy the resources/kafka-configuration.xml to "HIVEMQ_HOME/extensions/hivemq-kafka-extension" and adapt it to your environment.

  5. Delete the "HIVEMQ_HOME/extensions/hivemq-kafka-extension/DISABLED" file.

  6. Start HiveMQ.

First Steps

Manual Testing

Connect with an MQTT client of your choice. Publish a MQTT message to the topic transform/customization. Monitor your Kafka cluster for a record from topic transform.customization.

Next Steps

Awesome, you got your first HiveMQ Kafka customization working.

Now read the HiveMQ Kafka Extension Customization Documentation to see what customizations can do.

Need Help?

If you encounter any problems, we are happy to help. The best place to get in contact is our community forum.

License

HiveMQ Kafka Extension Hello World Customization is licensed under the APACHE LICENSE, VERSION 2.0. A copy of the license can be found here.