Azure-docs: How to manage IoT Hub connection strings when there are a few instances of IoT Hub in highload systems?

Created on 21 May 2020  Â·  4Comments  Â·  Source: MicrosoftDocs/azure-docs

Hello,

Need help with using many instances of IoT Hub.
Let's say there are 1 DPS service and 4 linked IoT Hub instance. All Microsoft.Devices.DeviceCreated events from IoT Hub routes to ServiceBus Topic. Then I have a simple consumer to handle those events and store deviceId and hubName to the database.

I need to send C2D message. Get device ID from the database and call the direct method. To call it, I need ServiceClient instance, connected to the appropriate IoT Hub.

How to get a connection string to that IoT Hub? How to manage that? Are there any docs/samples/common approach?
Thank you in advance.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 cxp iot-husvc product-question triaged

Most helpful comment

@Marusyk
Please have a look at the Azure IoT DPS REST API dcumentation.
Example:

  • Iot Dps Resource - Get
    You can see the response which gives you a list of IoT Hubs which are connected to the DPS along with their connection string.

image

Please let us know if you need further help.

Also for C2D you can refer to these to get started.

All 4 comments

@Marusyk Thanks for the feedback! We are currently investigating and will update you shortly.

@Marusyk
Please have a look at the Azure IoT DPS REST API dcumentation.
Example:

  • Iot Dps Resource - Get
    You can see the response which gives you a list of IoT Hubs which are connected to the DPS along with their connection string.

image

Please let us know if you need further help.

Also for C2D you can refer to these to get started.

@Marusyk Please let us know if you need further help.

@SatishBoddu-MSFT Thank you very much for your help. I'm going to close the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JeffLoo-ong picture JeffLoo-ong  Â·  3Comments

Favna picture Favna  Â·  3Comments

paulmarshall picture paulmarshall  Â·  3Comments

AronT-TLV picture AronT-TLV  Â·  3Comments

ianpowell2017 picture ianpowell2017  Â·  3Comments