Share via


DeviceClient.SendEventBatchAsync Method

Definition

Overloads

SendEventBatchAsync(IEnumerable<Message>)

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.

SendEventBatchAsync(IEnumerable<Message>, CancellationToken)

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.

SendEventBatchAsync(IEnumerable<Message>)

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.

public System.Threading.Tasks.Task SendEventBatchAsync(System.Collections.Generic.IEnumerable<Microsoft.Azure.Devices.Client.Message> messages);
member this.SendEventBatchAsync : seq<Microsoft.Azure.Devices.Client.Message> -> System.Threading.Tasks.Task
Public Function SendEventBatchAsync (messages As IEnumerable(Of Message)) As Task

Parameters

messages
System.Collections.Generic.IEnumerable<Message>

A list of one or more messages to send. The messages should be disposed after sending.

Returns

System.Threading.Tasks.Task

The task to await

Applies to

SendEventBatchAsync(IEnumerable<Message>, CancellationToken)

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.

public System.Threading.Tasks.Task SendEventBatchAsync(System.Collections.Generic.IEnumerable<Microsoft.Azure.Devices.Client.Message> messages, System.Threading.CancellationToken cancellationToken);
member this.SendEventBatchAsync : seq<Microsoft.Azure.Devices.Client.Message> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SendEventBatchAsync (messages As IEnumerable(Of Message), cancellationToken As CancellationToken) As Task

Parameters

messages
System.Collections.Generic.IEnumerable<Message>

An IEnumerable set of Message objects.

cancellationToken
System.Threading.CancellationToken

A cancellation token to cancel the operation.

Returns

System.Threading.Tasks.Task

The task to await

Exceptions

System.OperationCanceledException

Thrown when the operation has been canceled.

Applies to