question

AndreasKrger-9157 avatar image
2 Votes"
AndreasKrger-9157 asked SatishBoddu-MSFT commented

Limits and throttles in connection multiplexing scenario

We are implementing an IoT gateway that performs identity translation. The gateway should connect to IoT Hub on behalf of multiple field devices, which communicate to the gateway. Bidirectional communication (D2C and C2D) should be supported. The anticipated message rate is rather low (a few messages per device per day), whereas the number of devices is rather high (in the thousands or ten-thousands).

The communication between devices and gateway is connectionless. We have no knowledge whether a device is "connected" or "not connected" to the gateway. Thus, we want the gateway to receive all C2D messages for all devices that can possibly connect to the gateway.

Several questions regarding this scenario:

  • Is there a convenient way for the gateway to subscribe to C2D messages for all of its devices (e.g. using a wildcard pattern over the device name)? We believe that this is not supported, and that the gateway has to create one (logical) connection for each of its devices.

  • IoT Hub imposes rate limits on new device connections. The AMQP protocol supports connection multiplexing, i.e. several logical connections (channels) over a single AMQP connection. Do the limits apply to the AMQP connections or the logical connections?

  • Is there a limit on the number of logical connections per AMQP connection? In our scenario, would it be feasible to multiplex all devices through a single AMQP connection?


azure-iot-hubazure-iot-edge
· 2
5 |1600 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 @AndreasKrger-9157, Thanks for reaching out to us, we are looking into this.

0 Votes 0 ·

Hello @AndreasKrger-9157,Just checking in if you have had a chance to see the previous response.
Please accept helpful responses as 'Answer', which will be helpful to others as well with similar question.

0 Votes 0 ·
SatishBoddu-MSFT avatar image
1 Vote"
SatishBoddu-MSFT answered SatishBoddu-MSFT commented

Hello @AndreasKrger-9157, Thanks for contributing to this forum, below is the response from Microsoft Product Team, I hope this helps in your query.

  • The identity translation pattern is still in construction, for now, partners have to either use the transparent gateway pattern or the protocol translation one.


    Q1: Is there a convenient way for the gateway to subscribe to C2D messages for all of its devices (e.g. using a wildcard pattern over the device name)? We believe that this is not supported, and that the gateway has to create one (logical) connection for each of its devices.

Response: Using the transparent gateway pattern you can use the IoT Hub/Edge routing syntax to listen for all messages coming from all devices.

Q2: IoT Hub imposes rate limits on new device connections. The AMQP protocol supports connection multiplexing, i.e. several logical connections (channels) over a single AMQP connection. Do the limits apply to the AMQP connections or the logical connections?

Response: This limit apply to the number of AMQP connections and not the logical connections.

Q3: Is there a limit on the number of logical connections per AMQP connection? In our scenario, would it be feasible to multiplex all devices through a single AMQP connection?

Response: There are no hard limits. Exact limits depend on scenarios. Generally speaking, we do not recommend going beyond a thousand logical connections per AMQP connection.














· 2
5 |1600 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 @SatishBoddu-MSFT, thanks for your reply. Just to clarify, we are currently not using IoT Edge. So the question is more aiming at the features of IoT Hub and its support for AMQP. I only linked to the IoT Edge documentation because it has a beautiful documentation of the different gateway concepts.

In your response to Q1 you refer to "all messages coming from all devices". This sounds like Device-to-Cloud messaging. My question was about the other direction (Cloud-to-Device).
Still, what I understand from your comment about identity translation is that the gateway must initialize a DeviceClient for every single device it is responsible for. There is no "Catch-All"-DeviceClient or similar, to receive C2D messages for many devices. Do I get this right? Of course, this is no issue in the protocol translation pattern.

Thanks for the comments on the limits, this helps a lot.

0 Votes 0 ·

Hello @AndreasKrger-9157 , I had a discussion with the Product team and the Identity Translation pattern is still in construction, for now, it seems as of now I can provide only information on D2C (Transparent Gateway pattern), we will keep you posted if I see any updates. Also as Said by Sander in his reply, we might need to do the administration ourselves for your scenario.
Also, please follow this page for any further updates.


Please accept helpful responses as 'Answer', which will be helpful to others as well with similar question.


0 Votes 0 ·
SandervandeVelde42 avatar image
1 Vote"
SandervandeVelde42 answered SandervandeVelde42 edited

The transparent gateway routes leaf device messages through the routing into the EdgeHub.

Leaf device messages can be picked up within the routing with:

"routedFromLeafs": "FROM /messages/* WHERE NOT IS_DEFINED($connectionModuleId) INTO BrokeredEndpoint("/modules/somemodule/inputs/input1")",

· 2
5 |1600 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.

Hi @SandervandeVelde42, thanks for the reply. If I understand correctly, your answer is about D2C messages, whereas I am asking for C2D messaging. Please correct me if I missed something.

0 Votes 0 ·

You, the routing example I give is for D2C messages.

Regarding C2D messages, I do not see a way to intercept those messages sent to a child. And I do not prefer having them touched by any device (read: transparent gateway) in between, these messages are very specific to control a single device.

For now, you have to do the administration yourself.

Microsoft has announced a gateway supporting identity translation a while ago. There is no example yet... I have no information about the state of the plans.


0 Votes 0 ·