SALES: 1-800-867-1380

MessageLockLostException Class

 

The exception that is thrown to signal message lock lost errors.

Namespace:   Microsoft.ServiceBus.Messaging
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

System.Object
  System.Exception
    Microsoft.ServiceBus.Messaging.MessagingException
      Microsoft.ServiceBus.Messaging.MessageLockLostException

[SerializableAttribute]
public sealed class MessageLockLostException : MessagingException

NameDescription
System_CAPS_pubmethodMessageLockLostException(String)

Initializes a new instance of the MessageLockLostException class with a specified error message.

System_CAPS_pubmethodMessageLockLostException(String, Exception)

Initializes a new instance of the MessageLockLostException class with a specified error message and a reference to the inner exception that is the cause of this exception.

NameDescription
System_CAPS_pubpropertyData

Gets the data associated with the exception.(Inherited from MessagingException.)

System_CAPS_pubpropertyDetail

Gets or sets the detail information of the messaging exception.(Inherited from MessagingException.)

System_CAPS_pubpropertyHelpLink

(Inherited from Exception.)

System_CAPS_pubpropertyHResult

(Inherited from Exception.)

System_CAPS_pubpropertyInnerException

(Inherited from Exception.)

System_CAPS_pubpropertyIsTransient

Gets or sets a value indicating whether the exception is transient. Check this property to determine if the operation should be retried.(Inherited from MessagingException.)

System_CAPS_pubpropertyMessage

(Inherited from Exception.)

System_CAPS_pubpropertySource

(Inherited from Exception.)

System_CAPS_pubpropertyStackTrace

(Inherited from Exception.)

System_CAPS_pubpropertyTargetSite

(Inherited from Exception.)

System_CAPS_pubpropertyTimestamp

Gets or sets the time at which the messaging exception occurred.(Inherited from MessagingException.)

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodGetBaseException()

(Inherited from Exception.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetObjectData(SerializationInfo, StreamingContext)

Populates the serialization information with data about the exception.(Inherited from MessagingException.)

System_CAPS_pubmethodGetType()

(Inherited from Exception.)

System_CAPS_pubmethodToString()

(Inherited from Exception.)

If a message takes longer to process than the lock duration set on a queue or subscription, its visibility lock will time out and the message will again become available to the consumers of the queue or subscription. If you attempt to complete or abandon such a message, you may receive this exception, indicating that there is no valid lock found for the given message.

Additionally, in the case of partitioned messaging entities, partitions sometimes move to achieve load balancing across Service Bus nodes; for example, when a node restarts or new nodes are added to share the load. When that happens, message locks can be lost, but messages are never lost. If a partition moves after the message is locked, then the acknowledge/complete message processing call fails, because the lock is lost. However, the message remains and you can try to read it again. Thus, you may receive a MessageLockLostException exception even though the message itself is not lost. In this case, you can retry the message processing operation.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft