This project contains two example transformer implementations that show how to use the customization SDK for the HiveMQ Enterprise Extension for Amazon Kinesis.
-
The
com.hivemq.extensions.amazon.kinesis.customizations.helloworld.MqttToKinesisHelloWorldTransformerthat transforms and forwards MQTT publishes to Amazon Kinesis. -
The
com.hivemq.extensions.amazon.kinesis.customizations.helloworld.KinesisToMqttHelloWorldTransformerthat transforms and forwards Amazon Kinesis records to HiveMQ.
-
Clone this repository into a Java 11 Gradle project.
-
Run the
./gradlew jartask from Gradle to build the customization. -
Copy the
build/libs/hivemq-amazon-kinesis-hello-world-customization-4.46.0.jarfile to theHIVEMQ_HOME/extensions/hivemq-amazon-kinesis-extension/customizationsdirectory. -
Copy the
src/main/resources/amazon-kinesis-configuration.xmlfile to theHIVEMQ_HOME/extensions/hivemq-amazon-kinesis-extensionfolder. -
Adapt the configuration to your environment.
-
(optional): Uncomment and adjust
<aws-credential-profiles>to manage your AWS credential profiles. -
(optional): Uncomment and adjust
<aws-credential-profile-id>to reference your AWS credential profiles. -
(optional): Uncomment and adjust
<region>to choose your desired AWS Region. -
Set the
<value>of the destination<custom-setting>in the<mqtt-to-kinesis-route>to an existing Amazon Kinesis stream. -
Set the
<name>of the<kinesis-stream>in the<kinesis-to-mqtt-route>to an existing Amazon Kinesis stream. -
Set the
<consumer-application-name>of the<kinesis-stream>in the<kinesis-to-mqtt-route>to a unique value.
-
-
Delete the
HIVEMQ_HOME/extensions/hivemq-amazon-kinesis-extension/DISABLEDfile (if there is one). -
Start HiveMQ.
-
Connect with an MQTT client of your choice.
-
Publish an MQTT message to the topic
to-kinesis/test. -
Monitor the stream you configured in your AWS account for a received message.
-
Connect with an MQTT client of your choice.
-
Subscribe to
from-kinesis/#. -
Publish an Amazon Kinesis record to the Amazon Kinesis stream.
-
Verify that you receive an MQTT message with your client.
If you encounter any problems, we are happy to help. The best place to get in contact is our community forum.
HiveMQ Amazon Kinesis Extension Hello World Customization is licensed under the APACHE LICENSE, VERSION 2.0.
A copy of the license can be found here.