This is an example of using the MQTT integration of Drogue IoT in combination with Quarkus.
It is a small Quarkus application, which connects to the MQTT integration endpoint of Drogue IoT. Receiving messages from devices publishing to Drogue IoT Cloud.
This is a standard Quarkus application, you can run it in any way you would run a normal Quarkus/Java application.
In the following sub-sections give you some help, with some common examples.
Simply run it using:
mvn quarkus:dev
The repository has a deploy/
folder, which contains deployment scripts for Kubernetes.
All you need to do is to deploy the YAML file:
kubectl apply -f deploy/
You can also deploy this using the Quarkus Helm charts. This will set up a build on the Cluster too.
helm install --repo https://redhat-developer.github.io/redhat-helm-charts \
my-drogue-quarkus-mqtt-integration quarkus \
--set build.uri=https://github.com/drogue-iot/quarkus-mqtt-integration-starter
Also see: https://github.com/redhat-developer/redhat-helm-charts/tree/master/alpha/quarkus-chart
Once it is running, you can navigate to its web frontend and should see something like this:
The dashboard will show the most recent state information. If the temperature information did have geo-coordinates attached, it will drop a marker on the map with the measured temperature. Only the most recent value will be shown.
The data comes from a public instance of Drogue IoT. The Quarkus backend subscribes to the data stream using MQTT and consumes all incoming data.
You can clone this repository, and start making modifcations to the example. Either running it locally, or deploying it on your own cluster.