SALES: 1-800-867-1380

BrokeredMessage.SessionId Property

Gets or sets the identifier of the session.

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

'Declaration
Public Property SessionId As String 
	Get 
	Set
'Usage
Dim instance As BrokeredMessage 
Dim value As String 

value = instance.SessionId

instance.SessionId = value

Property Value

Type: System.String
The identifier of the session.

ExceptionCondition
ObjectDisposedException

Thrown if the message is in disposed state.

A SessionId is a logical and lightweight way to correlate messages to each other. For example, the sender can set SessionId = "NewSessionId" of several messages as an indicator that these messages are related to each other. This SessionId does not represent any significance to the Service Bus and not checked by the service. It is for the receivers to consume if needed.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft