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.MqttToKinesisHelloWorldTransformer
that transforms and forwards MQTT publishes to Amazon Kinesis. -
The
com.hivemq.extensions.amazon.kinesis.customizations.helloworld.KinesisToMqttHelloWorldTransformer
that transforms and forwards Amazon Kinesis records to HiveMQ.
-
Clone this repository into a Java 11 Gradle project.
-
Run the
./gradlew jar
task from Gradle to build the customization. -
Copy the
build/libs/hivemq-amazon-kinesis-hello-world-customization-4.37.0.jar
file to theHIVEMQ_HOME/extensions/hivemq-amazon-kinesis-extension/customizations
directory. -
Copy the
src/main/resources/amazon-kinesis-configuration.xml
file to theHIVEMQ_HOME/extensions/hivemq-amazon-kinesis-extension
folder. -
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/DISABLED
file (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.