Multiplexing Device-Connection via JAVA-SDK

Michael Mangeng 1 Reputation point


we want to connect an existing system with a field-gateway like structure to azure iot hub. Our system already registers devices in azure iot hub using DPS group enrollment. After the enrollment process, we want to:

  • Send/Receive messages to/from iot hub
  • Send/Receive DeviceTwin updates (reported/desired) properties.

Currently we are not able to figure out how this can be done using the java-sdk. We can see that we have to use the TransportClient via AMQP and then add all devices which are to be multiplexed through this connection. Nevertheless, we are not able to figure our what we have to supply as ConnectionString for the first (and the successive) devices.

Can somebody drop a hint or point us to an example/relevant documentation?

We've got more than 100K devices. Currently we can see that adding/removing devices while using the TransportClient is not possible. Therefore we intend to create clusters containing e.g. 1000 devices each so we have to restart only 1 cluster if a device is added/removed. If there are better possibilities, we would be glad to hear about!


Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
786 questions
Azure IoT SDK
Azure IoT SDK
An Azure software development kit that facilitates building applications that connect to Azure IoT services.
172 questions
{count} votes

1 answer

Sort by: Newest
  1. SatishBoddu-MSFT 15,121 Reputation points

    Hello @Michael Mangeng , Thanks for reaching out to us!

    I hope you have already referred to below Github sample code.

    [Device 1 connection string] - String containing Hostname, Device Id & Device Key in one of the following formats:



    Please let us know if you need further help in this matter.