Limits and throttles in connection multiplexing scenario

Andreas Krüger 31 Reputation points
2020-08-18T12:45:05.813+00:00

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 Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
530 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,112 questions
{count} votes

Accepted answer
  1. QuantumCache 20,026 Reputation points
    2020-08-20T03:00:41.767+00:00

    Hello @Andreas Krüger , 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.


1 additional answer

Sort by: Most helpful
  1. Sander van de Velde 28,161 Reputation points MVP
    2020-08-20T10:30:41.43+00:00

    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")",

    1 person found this answer helpful.