SALES: 1-800-867-1380

SessionLockLostException Class

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

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, session locks can be lost, but messages are never lost. If a partition moves after the session 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 SessionLockLostException exception even though the message itself is not lost. In this case, you can retry the message processing operation.

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

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

[SerializableAttribute]
public sealed class SessionLockLostException : MessagingException

The SessionLockLostException type exposes the following members.

  NameDescription
Public methodSessionLockLostException(String)Initializes a new instance of the SessionLockLostException class with a specified error message.
Public methodSessionLockLostException(String, Exception)Initializes a new instance of the SessionLockLostException class with a specified error message and a reference to the inner exception that is the cause of this exception.
Top

  NameDescription
Public propertyDataGets the data associated with the exception. (Inherited from MessagingException.)
Public propertyDetailGets or sets the detail information of the messaging exception. (Inherited from MessagingException.)
Public propertyHelpLink (Inherited from Exception.)
Public propertyHResult (Inherited from Exception.)
Public propertyInnerException (Inherited from Exception.)
Public propertyIsTransientGets or sets a value indicating whether the exception is transient. Check this property to determine if the operation should be retried. (Inherited from MessagingException.)
Public propertyMessage (Inherited from Exception.)
Public propertySource (Inherited from Exception.)
Public propertyStackTrace (Inherited from Exception.)
Public propertyTargetSite (Inherited from Exception.)
Public propertyTimestampGets or sets the time at which the messaging exception occurred. (Inherited from MessagingException.)
Top

  NameDescription
Public methodEquals (Inherited from Object.)
Public methodGetBaseException (Inherited from Exception.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetObjectDataPopulates the serialization information with data about the exception. (Inherited from MessagingException.)
Public methodGetType (Inherited from Exception.)
Public methodToString (Inherited from Exception.)
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft