Azure / azure-iot-hub-node

Azure IoT Hub Data Plane Node SDK
MIT License
2 stars 8 forks source link

Opening multiple connections with IOT Hub as a publisher #51

Open Kshitij-Gajbhiye opened 3 months ago

Kshitij-Gajbhiye commented 3 months ago

I need advantages and disadvantages of opening multiple connections with IOT Hub as a publisher.

Basically I have multiple services (node applications) each opening a connection with IOT Hub to send messages (C2D) to IOT devices. Right now I am able to open the connection and also send (C2D) messages.

For reference (The devices use mqtt to connect to IOT Hub)

Is this the right approach of opening multiple connections with IOT Hub? Can I get advantages and disadvantages of taking this approach or if I could get a better approach for handling this scenario it will be helpful.

I have tested this scenario by creating multiple node processes and opening multiple connections to IOT Hub as a publisher in each node process and it lets me connect.

The only issue is any one of the node process gets the feedback. Apart from that all the node process are able to connect and send messages.