Priit Welcome to Microsoft Q&A forum!
Are there plans to add a shared topic for all devices? I would like to send a single message from the cloud to the devices (all devices that are connected to the IoT Hub) and these devices would all consume this message from a single topic.
Azure IoT Hub does not have a shared topic for all devices. Instead, each device has its own unique topic that is used for communication.
When I have 10000 devices connected to the IoT Hub and I want to send same message to all the devices at the same time (~1 sec).
You can use the IoT Hub Device Twin feature to create groups of devices and then send messages to those groups. This allows you to send messages to multiple devices at once, without having to specify each individual device's topic.
For example, you can create a group called "Group1" and add your devices to that group. Then, you can use the following REST API call to send a message to that group:
PUT https://{iothubname}.azure-devices.net/twins/{deviceId}/methods?api-version=2018-06-30
In the request body, you can specify the method name and the payload for the message. The payload can be any valid JSON object.
For more details, please refer to Understand and use device twins in IoT Hub and Communicate with your IoT hub using the MQTT protocol
Reference: Can I send a message to a group of Azure IoT Hub Devices connected via MQTT WebSocket?
Hope this helps. Please let us know if you have any further queries.
If this answers your query, do click Accept Answer and Yes if this answer helpful. And, if you have any further query do let us know.