0
votes

Our Edge Devices are based on the Azure IoT Edge Runtime. One of the modules, which is responsible of data processing is a custom module running a version of Apache Nifi. The output of the processing should either go to the Azure IoT Edge Message Bus and/or to the Cloud Upstream via IoT Hub.

Does anybody know how to connect those parts of the Edge System? Do we have to write C# code on the custom module to get this done or is there another way to accomplish this?

Edit:

After further investigation i learned that i can connect to IoT Hub using MQTT according to this and interaction with the local Message Bus should be able by writing a custom Nifi Processor as shown here using the Java SDK of the ModuleClient, just supplying a correct connection string and making sure, the custom container can reach the host machine via IP.

Do you think my assumptions are correct to achieve our goal?

1
in nifi there are ConsumeMQTT and PublishMQTT processots. If your question about mqtt - then you don't need to write custom processor. if you need custom processor then you can use groovy script processor to minimize POC efforts.daggett
@daggett Thank you for your comment. That would make interaction with the local IoT Hub even easier. Ok, so i could use the local IoT Hub via MQTT for Cloud Upstream and Module-To-Module communication?Markus S.
Ok, i misunderstood IoT Edge Hub and the local message broker as being 2 different components but in fact they are the same. IoT Edge Hub takes care of both cloud upstream and local module-to-module communication.Markus S.

1 Answers

1
votes

Your assumptions are correct. You'll have to write a custom Nifi Processor using the Java Azure IoT SDK ModuleClient class. I've done something quite similar in my spring-boot-iotedge-sample of my Java Azure IoT Edge samples at https://github.com/JMayrbaeurl/azure-iotedge-java-samples