| Crates.io | azure_iot_operations_connector |
| lib.rs | azure_iot_operations_connector |
| version | 1.1.0-rc1 |
| created_at | 2025-12-12 23:06:25.832314+00 |
| updated_at | 2026-01-08 18:12:01.831647+00 |
| description | Azure IoT Operations Connector |
| homepage | |
| repository | https://github.com/Azure/iot-operations-sdks |
| max_upload_size | |
| id | 1982307 |
| size | 457,719 |
Framework for building Azure IoT Operations connectors that handle device discovery, asset definitions, and data transformation.
The Azure IoT Operations Connector framework provides:
Build connectors that seamlessly integrate with Azure IoT Operations to transform and forward data from edge devices.
examples folder of this crate.To deploy follow these steps (from the root of the crate):
cargo build --release --target-dir target --example connector_get_adr_definitionsdocker build -t connectorgetadrdefinitions:latest -f examples/connector_get_adr_definitions_resources/Dockerfile .k3d image import connectorgetadrdefinitions:latestkubectl apply -f examples/connector_get_adr_definitions_resources/connector_template.yamlkubectl apply -f examples/connector_get_adr_definitions_resources/thermostat-device-definition.yamlkubectl apply -f examples/connector_get_adr_definitions_resources/rest-thermostat-asset-definition.yamlexamples folder of this crate.To deploy follow these steps (from the root of the crate):
cargo build --release --target-dir target --example base_connector_sampledocker build -t baseconnector:latest -f examples/base_connector_sample_resources/Dockerfile .docker tag baseconnector <your ACR name>.azurecr.io/baseconnectoraz loginaz acr login --name <your ACR name>docker push <your ACR name>.azurecr.io/baseconnectorkubectl apply -f examples/base_connector_sample_resources/connector_template.yamlkubectl apply -f examples/base_connector_sample_resources/thermostat-device-definition.yamlkubectl apply -f examples/base_connector_sample_resources/rest-thermostat-asset-definition.yamlAny error that is returned to the Connector Application will not be logged, it is the responsibility of the Connector Application to log them
All errors that are retried are logged when retried.
This is the retry strategy used: const RETRY_STRATEGY: tokio_retry2::strategy::ExponentialFactorBackoff = tokio_retry2::strategy::ExponentialFactorBackoff::from_millis(500, 2.0);
Any AIO Protocol Error is considered a "network error" and retriable. This may not be the case, but we currently don't provide enough information on the AIO Protocol Error to be able to distinguish the difference. Once we have that information, we will update handling to only retry actual network errors. Effort has been made to dive into the scenarios and ensure that any non-network errors are already validated against and not possible.
| Scenario that returns an error | Retry attempts | Retried Errors | Immediate Failure Errors | Logged? | Additional Behavior on failure | Notes |
|---|---|---|---|---|---|---|
| device/asset update observation | indefinite | Network Errors | Service Errors | Y | device/asset creation notification is dropped | It is not a problem to block other operations on these retries because they would also be affected by network issues. |
| device/asset update unobservation | indefinite | Network Errors | Service Errors | Y | This is a cleanup action, so if it fails, we just log it. | |
| get device/asset definition, or get device/asset status | indefinite | Network Errors | Service Errors | Y | device/asset creation notification is dropped and device/asset update unobservation is called | It is not a problem to block other operations on these retries because they would also be affected by network issues. |
| reporting status/message schema to ADR | 10 | Network Errors | Service Errors | N | Error returned to application/caller | |
| * Asset status is reported by the base connector | None (because underlying operation is already retried) | - | - | Y | ||
Message Schema PUT to Schema Registry |
indefinite | Network Errors | Service Errors | N | Error returned to application/caller | |
| Base Connector's MQTT Session ends | None | - | - | N | Error returned to application | This is currently fatal |
| Forwarding Data | None | - | - | N | Error returned to application | Retry should be handled by the Connector Application so that the appropriate timing of retrying this piece of data can be configured. Standard MQTT retries/guarantees are in place |
| Scenario | Logged? | Additional Behavior on failure | Notes |
|---|---|---|---|
| Asset has an invalid default dataset/event/stream destination | Y | Error will be reported on it's status to ADR (see * for error handling of this action) | - |
| Data Operation (dataset/event/stream) update has an invalid destination | Y | Error will be reported on it's status to ADR (see * for error handling of this action). An UpdatedInvalid notification will be provided to the application instead of an Updated notification so that it knows not to operate on the data operation until a new update is received. |
- |
| New Data Operation has an invalid destination | Y | Error will be reported on it's status to ADR (see * for error handling of this action). The DataOperationCleint will not be provided to the Connector Application since it cannot be used | - |
| Update is received for a Data Operation, but the DataOperationClient has been dropped | Y | Data Operation update will be dropped | - |
| Device endpoint create notification provides a device/endpoint name that returns a device with no inbound endpoint from the service | Y | Unobserve is called, and the create notification is dropped | This is really only possible if the device endpoint gets deleted between the time we receive the notification and the get device call is made, so losing this notification means it was out of date. |
If Connector Artifacts contain invalid or incorrect values, setup of the BaseConnector will return an error indicating the reason.