QueueClient::AcceptMessageSession Method (String^, TimeSpan)

 

Accepts a message session that allows grouping of related messages for processing in a single transaction using the given session identifier and wait time.

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

public:
virtual MessageSession^ AcceptMessageSession(
	String^ sessionId,
	TimeSpan serverWaitTime
) sealed

Parameters

sessionId
Type: System::String^

The session identifier of the message session.

serverWaitTime
Type: System::TimeSpan

The time span the server waits for processing messages before it times out.

Return Value

Type: Microsoft.ServiceBus.Messaging::MessageSession^

A MessageSession that allows grouping of related messages for processing in a single transaction.

Exception Condition
ArgumentException

Thrown if sessionId is null, empty, or white spaces.

ArgumentOutOfRangeException

Thrown if serverWaitTime is not a positive TimeSpan value.

OperationCanceledException

Thrown if the client is already closed, aborted, or disposed.

TimeoutException

Thrown if the operation exceeded the timeout value set by OperationTimeout.

Return to top
Show: