SubscriptionClient.Abandon Method

Definition

Overloads

Abandon(Guid)

Discards the message and relinquishes the message lock ownership.

Abandon(Guid, IDictionary<String,Object>)

Discards the message and relinquishes the message lock ownership.

Abandon(Guid)

Discards the message and relinquishes the message lock ownership.

public void Abandon (Guid lockToken);
Parameters
lockToken
Guid

The lock token bound to the locked message instance to abandon.

Exceptions

Thrown if the operation exceeded the timeout value set via OperationTimeout.

Thrown if the client entity has been closed or aborted.

Remarks

When the client fails to get the message from the queue/topic, this method should be called. Service Bus will increment the delivery count of the message. The client now can either attempt to receive the message again or move it to the dead-letter queue.

Abandon(Guid, IDictionary<String,Object>)

Discards the message and relinquishes the message lock ownership.

public void Abandon (Guid lockToken, System.Collections.Generic.IDictionary<string,object> propertiesToModify);
Parameters
lockToken
Guid

The lock token bound to the locked message instance to abandon.

propertiesToModify
IDictionary<String,Object>

A collection of property objects to be modified.

Remarks

When the client fails to get the message from the queue/topic, this method should be called. Service Bus will increment the delivery count of the message. The client now can either attempt to receive the message again or move it to the dead-letter queue.