IotHubModuleClient.SendTelemetryBatchAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sends a batch of events to IoT hub. Use AMQP or HTTPs for a true batch operation. MQTT will just send the messages one after the other. IotHubModuleClient instance must be opened already.
public System.Threading.Tasks.Task SendTelemetryBatchAsync (string outputName, System.Collections.Generic.IEnumerable<Microsoft.Azure.Devices.Client.TelemetryMessage> messages, System.Threading.CancellationToken cancellationToken = default);
override this.SendTelemetryBatchAsync : string * seq<Microsoft.Azure.Devices.Client.TelemetryMessage> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SendTelemetryBatchAsync (outputName As String, messages As IEnumerable(Of TelemetryMessage), Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- outputName
- String
The output target for sending the given message.
- messages
- IEnumerable<TelemetryMessage>
A list of one or more messages to send.
- cancellationToken
- CancellationToken
A cancellation token to cancel the operation.
Returns
The task containing the event
Exceptions
Thrown if IotHubModuleClient instance is not opened already.
Thrown when the operation has been canceled.
Remarks
For more information on IoT Edge module routing https://docs.microsoft.com/azure/iot-edge/module-composition?view=iotedge-2018-06#declare-routes.
Applies to
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기