question

MichaelMangeng-0521 avatar image
0 Votes"
MichaelMangeng-0521 asked ·

Multiplexing Device-Connection via JAVA-SDK

Hi,

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!

greetings,
Michael



azure-iot-hubazure-iot-sdk
· 2
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @MichaelMangeng-0521, Just checking back.
Please accept the below helpful responses as 'Answer', which will be helpful to others as well with similar question, so that we can close this thread.

0 Votes 0 ·

Hello @MichaelMangeng-0521, Just checking back.
Please accept the below helpful responses as 'Answer', which will be helpful to others as well with similar question, so that we can close this thread.

0 Votes 0 ·

1 Answer

SatishBoddu-MSFT avatar image
0 Votes"
SatishBoddu-MSFT answered ·

Hello @MichaelMangeng-0521, 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:
HostName=<iothub_host_name>;DeviceId=<device_id>;SharedAccessKey=<device_key>\n"

22484-image.png

22468-image.png


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






image.png (103.7 KiB)
image.png (29.7 KiB)
· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @MichaelMangeng-0521, Just checking back.
Please accept the below helpful responses as 'Answer', which will be helpful to others as well with similar question, so that we can close this thread.

0 Votes 0 ·