Share via


DeviceClient.AbandonAsync Method

Definition

Overloads

AbandonAsync(Message)

Puts a received message back onto the device queue

AbandonAsync(String)

Puts a received message back onto the device queue

AbandonAsync(Message, CancellationToken)

Puts a received message back onto the device queue

AbandonAsync(String, CancellationToken)

Puts a received message back onto the device queue

AbandonAsync(Message)

Puts a received message back onto the device queue

public System.Threading.Tasks.Task AbandonAsync(Microsoft.Azure.Devices.Client.Message message);
member this.AbandonAsync : Microsoft.Azure.Devices.Client.Message -> System.Threading.Tasks.Task
Public Function AbandonAsync (message As Message) As Task

Parameters

message
Message

The message.

Returns

System.Threading.Tasks.Task

The lock identifier for the previously received message

Remarks

You cannot Abandon a message over MQTT protocol. For more details, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-c2d#the-cloud-to-device-message-life-cycle.

Applies to

AbandonAsync(String)

Puts a received message back onto the device queue

public System.Threading.Tasks.Task AbandonAsync(string lockToken);
member this.AbandonAsync : string -> System.Threading.Tasks.Task
Public Function AbandonAsync (lockToken As String) As Task

Parameters

lockToken
System.String

The message lockToken.

Returns

System.Threading.Tasks.Task

The previously received message

Remarks

You cannot Abandon a message over MQTT protocol. For more details, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-c2d#the-cloud-to-device-message-life-cycle.

Applies to

AbandonAsync(Message, CancellationToken)

Puts a received message back onto the device queue

public System.Threading.Tasks.Task AbandonAsync(Microsoft.Azure.Devices.Client.Message message, System.Threading.CancellationToken cancellationToken);
member this.AbandonAsync : Microsoft.Azure.Devices.Client.Message * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function AbandonAsync (message As Message, cancellationToken As CancellationToken) As Task

Parameters

message
Message

The message.

cancellationToken
System.Threading.CancellationToken

A cancellation token to cancel the operation.

Returns

System.Threading.Tasks.Task

The lock identifier for the previously received message

Exceptions

System.OperationCanceledException

Thrown when the operation has been canceled.

Remarks

You cannot Abandon a message over MQTT protocol. For more details, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-c2d#the-cloud-to-device-message-life-cycle.

Applies to

AbandonAsync(String, CancellationToken)

Puts a received message back onto the device queue

public System.Threading.Tasks.Task AbandonAsync(string lockToken, System.Threading.CancellationToken cancellationToken);
member this.AbandonAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function AbandonAsync (lockToken As String, cancellationToken As CancellationToken) As Task

Parameters

lockToken
System.String

The message lockToken.

cancellationToken
System.Threading.CancellationToken

A cancellation token to cancel the operation.

Returns

System.Threading.Tasks.Task

The previously received message

Exceptions

System.OperationCanceledException

Thrown when the operation has been canceled.

Remarks

You cannot Abandon a message over MQTT protocol. For more details, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-c2d#the-cloud-to-device-message-life-cycle.

Applies to