0
votes

I'm new using IOT Hub from Azure and I am writing a connector which listen to an enterprise MQTT broker and send them back to an IOT Hub server. The problem I'm facing is that I need to create a connection per devices... Is there a way to avoid that ?

Either by using the IOT Hub client SDK or any MQTT library (like paho)

It's not an option to program all the devices to connect directly to the IOT Hub.

2

2 Answers

0
votes

The azure iot java sdk supports connection sharing. Go to the samples section of the sdk (https://github.com/azure/azure-iot-sdk-java/device/iot-device-samples and take a look at the transportclient-samples.

0
votes

For MQTT supported on Azure IoT Hub, there is only one active connection of one registered device Id at the same time.

For connection multiplexing across devices, you can select AMQP protocol.

More detailed information about MQTT supported and choosing a protocol you can reference:

Communicate with your IoT hub using the MQTT protocol

choose a communication protocol