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?