Interface IMessageSchemaProvider
- Namespace
- Azure.Iot.Operations.Connector
- Assembly
- Azure.Iot.Operations.Connector.dll
The interface for a connector to request message schema information about datasets and/or events
public interface IMessageSchemaProvider
Remarks
NoMessageSchemaProvider can be used if you do not want to register any message schemas for your datasets or events.
Methods
GetMessageSchemaAsync(AssetEndpointProfile, Asset, string, Dataset, CancellationToken)
Get the message schema associated with this dataset. If provided, the connector will register this message schema prior to forwarding any dataset telemetry for this dataset..
Task<ConnectorMessageSchema?> GetMessageSchemaAsync(AssetEndpointProfile assetEndpointProfile, Asset asset, string datasetName, Dataset dataset, CancellationToken cancellationToken = default)
Parameters
assetEndpointProfile
AssetEndpointProfileThe asset endpoint profile this dataset will be sampled from.
asset
AssetThe asset this dataset belongs to.
datasetName
stringThe name of the dataset.
dataset
DatasetThe dataset.
cancellationToken
CancellationTokenCancellation token.
Returns
- Task<ConnectorMessageSchema>
The message schema to register for data sampled from this dataset. If null, no message schema will be registered for this dataset.
GetMessageSchemaAsync(AssetEndpointProfile, Asset, string, Event, CancellationToken)
Get the message schema associated with this event. If provided, the connector will register this message schema prior to forwarding any event telemetry for this event.
Task<ConnectorMessageSchema?> GetMessageSchemaAsync(AssetEndpointProfile assetEndpointProfile, Asset asset, string eventName, Event assetEvent, CancellationToken cancellationToken = default)
Parameters
assetEndpointProfile
AssetEndpointProfileThe asset endpoint profile this event will be received from.
asset
AssetThe asset this event belongs to.
eventName
stringThe name of the event.
assetEvent
EventThe event
cancellationToken
CancellationTokenCancellation token.
Returns
- Task<ConnectorMessageSchema>
The message schema to register for data received from this event. If null, no message schema will be registered for this event.