SessionLockLostException SessionLockLostException SessionLockLostException Class

Definition

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.

[Serializable]
public sealed class SessionLockLostException : Microsoft.ServiceBus.Messaging.MessagingException
type SessionLockLostException = class
    inherit MessagingException
Public NotInheritable Class SessionLockLostException
Inherits MessagingException
Inheritance
SessionLockLostExceptionSessionLockLostExceptionSessionLockLostException
Attributes
SerializableAttribute

Constructors

SessionLockLostException(String) SessionLockLostException(String) SessionLockLostException(String)

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

SessionLockLostException(String, Exception) SessionLockLostException(String, Exception) SessionLockLostException(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.

Properties

Data Data Data

Gets the data associated with the exception.

(Inherited from MessagingException)
Detail Detail Detail

Gets or sets the detail information of the messaging exception.

(Inherited from MessagingException)
IsTransient IsTransient IsTransient

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)
Timestamp Timestamp Timestamp

Gets or sets the time at which the messaging exception occurred.

(Inherited from MessagingException)

Methods

GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext)

Populates the serialization information with data about the exception.

(Inherited from MessagingException)

Extension Methods

CheckIotHubErrorCode(Exception, ErrorCode[]) CheckIotHubErrorCode(Exception, ErrorCode[]) CheckIotHubErrorCode(Exception, ErrorCode[])
DisablePrepareForRethrow(Exception) DisablePrepareForRethrow(Exception) DisablePrepareForRethrow(Exception)
GetReferenceCode(Exception) GetReferenceCode(Exception) GetReferenceCode(Exception)
IsFatal(Exception) IsFatal(Exception) IsFatal(Exception)
PrepareForRethrow(Exception) PrepareForRethrow(Exception) PrepareForRethrow(Exception)
ToStringSlim(Exception) ToStringSlim(Exception) ToStringSlim(Exception)
Unwind(Exception) Unwind(Exception) Unwind(Exception)
Unwind(Exception, Type[]) Unwind(Exception, Type[]) Unwind(Exception, Type[])
Unwind<TException>(Exception) Unwind<TException>(Exception) Unwind<TException>(Exception)
IsWrappedExceptionTransient(Exception) IsWrappedExceptionTransient(Exception) IsWrappedExceptionTransient(Exception)
FindInnerException<T>(Exception) FindInnerException<T>(Exception) FindInnerException<T>(Exception)

Applies to