Relationships between resources in Yandex IoT Core
The service provides two resource management models: brokers and device registries. The main service elements are devices, registries, and brokers. They can exchange various data and commands using the MQTT server.
Registries and devices are related to each other in a way that devices can exchange data with the registry in which they are created. The broker is not related to registries or devices and implements a separate messaging management model.
Data is exchanged via MQTT
For devices and registries to begin exchanging data and commands, you need to log in. You can do this using X.509 certificates or your username and password.
Device
A device is an instance of a physical device, such as a temperature sensor, represented in the service as the device name and its certificate.
Devices are created in a registry. They can send telemetry data to the server, get commands, and interact with other devices in the registry.
Registry
A registry is a set of devices that are logically related to each other. Registries can read device data and send commands to them.
Broker
Note
The broker is at the Preview stage.
A broker is a virtual MQTT server that allows MQTT clients to exchange messages in an isolated topic space. The broker imposes fewer restrictions on the way messages are exchanged than the device registry model does.
MQTT server
An MQTT server is a central node for exchanging MQTT messages between devices and registries. Data is only exchanged through the server. It's responsible for receiving and processing messages and controls their delivery to MQTT clients (devices or registries) to ensure the necessary QoS.
MQTT clients are devices, registries, and broker clients that exchange messages containing data or commands. Each message includes a topic, which is a message subject used to classify data and identify the client this data is intended for.
To make sure devices, registries, and broker clients receive each other's messages via the MQTT server, subscribe them to the appropriate topics.
If you have devices with sensor readings that you need to quickly respond to and you may face network communication problems and a broken connection between your devices and the MQTT server, you can subscribe your devices and registries to permanent topics.
For example, use permanent topics for temperature sensors on devices that need to be turned off quickly when heated to a certain temperature.
QoS levels
When exchanging messages, Yandex IoT Core supports the following quality of service (QoS) levels for MQTT:
-
QoS 0: At most once
: Message is sent no more than once and there is no guarantee of delivery. -
QoS 1: At least once
. This level guarantees that a message is delivered to a client at least once. There is a chance of receiving duplicate messages.
For more information about Yandex IoT Core service limits, see Quotas and limits in Yandex IoT Core.