Hello @Ben Dimelow .
it seems you are reusing the same connection string for a single device multiple times.
Because the applications are bound to the same device, you obviously want to have single-device registration.
There are two ways to solve the 'collision'.
First, check out these module identities you can add to a single device:
Each module is a logical part of the device it is created in. It get's its own credentials:
Add a module identity for each application:
Now, the applications are still transmitting their messages as being part of that single device. Next to the DeviceId, the IoT Hub also exposes the ModuleId:
So, you can still distinguish the separate message 'source'.
The other solution is checking out Azure IoT Edge.
If your device is capable of running Docker containers (can it run Moby?) you could move your application logic into Docker containers and use Azure IoT Edge.
Actually, Azure IoT Edge registers these containers as modules too.
These are several advantages to checking out the edge.
In your case, there are two advantages seen as 'low hanging fruit':
- modules messages bound for the cloud are stored automatically when the internet connection is not available. Messages are then sent at a later moment, no message loss or homebrew solution needed.
- modules are updated from the cloud using the IoT Hub logic (a deployment manifest)