您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

BrokeredMessage.Abandon Method

Definition

Overloads

Abandon()

Abandons the lock on a peek-locked message.

Abandon(IDictionary<String,Object>)

Abandons the lock on a peek-locked message.

Abandon()

Abandons the lock on a peek-locked message.

public void Abandon ();
Exceptions

Thrown when the message is in the disposed state or the receiver with which the message was received is in disposed state.

Thrown when invoked on a message that has not been received from the message server or invoked on a message that has not been received in peek-lock mode.

Thrown when operation times out. The timeout period is initialized through the MessagingFactorySettings. You may need to increase the value of OperationTimeout to avoid this exception if the timeout value is relatively low.

Thrown when the queue or subscription that receives the message is no longer present in the message server.

When service bus service is busy and is unable process the request.

When messaging entity the message was received from has been deleted.

When the lock associated with this message was lost or the lock token was not found.

When this message was received from a Session and the lock associated with the session was lost.

When the security token provided by the TokenProvider does not contain the claims to perform this operation.

When the number of concurrent connections to an entity exceed the maximum allowed value.

Remarks

This operation should only be exercised on a message received in peek-lock mode.

Abandon(IDictionary<String,Object>)

Abandons the lock on a peek-locked message.

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

The key-value pair collection of properties to modify.

Exceptions

Thrown when operation times out. Timeout period is initialized through the MessagingFactorySettings. You may need to increase the value of OperationTimeout to avoid this exception if timeout value is relatively low.

Thrown when the queue or subscription that the message was received from is no longer present in the message server.

Remarks

This operation should only be exercised on a message received in peek-lock mode.

Applies to