I want to write a C# application which gets messages out of an IoT Edge hub on an IoT Edge device before they are sent to the IoT Hub.
I want to write an end-to-end test for my IoT edge modules. To do this, I'm going to run the whole IoT edge runtime as well as an MQTT server within a Docker container. I then want to write a test which sends data to the MQTT server from outside the container and retrieves them back by connecting directly to the IoT edge hub.
My initial architecture looks like this:
But I want to have something like this:
I still need the IoT hub to create devices on the edge, but I want to listen directly to the edge hub to retrieve messages out of my pipeline.
I could write a "test module" which does my test within the container, but that's actually not what I want to do.
So my questions are:
- Is this actually possible to do?
- Where can I get information on how to connect directly to IoT Edge hub?