SALES: 1-800-867-1380
Collapse the table of content
Expand the table of content
Expand Minimize

MessageSession::SetStateAsync Method (Stream^)


Asynchronously sets the state of the message session.

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

Task^ SetStateAsync(
	Stream^ sessionState



The stream to which the state information is persisted.

Return Value

Type: System.Threading.Tasks::Task^

The state of the message session.

Note that you cannot set the TTL (DefaultMessageTimeToLive) property for message sessions. As such, you must perform your own cleanup operations, otherwise the message will exist until the queue is deleted.

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