QueueClient.AcceptMessageSession Method

Definition

Overloads

AcceptMessageSession()

Accepts a message session that allows grouping of related messages for processing in a single transaction.

AcceptMessageSession(String)

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

AcceptMessageSession(TimeSpan)

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

AcceptMessageSession(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.

AcceptMessageSession()

Accepts a message session that allows grouping of related messages for processing in a single transaction.

public Microsoft.ServiceBus.Messaging.MessageSession AcceptMessageSession ();
Returns

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

Exceptions

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

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

AcceptMessageSession(String)

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

public Microsoft.ServiceBus.Messaging.MessageSession AcceptMessageSession (string sessionId);
Parameters
sessionId
String

The session identifier of the message session.

Returns

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

Exceptions

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

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

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

AcceptMessageSession(TimeSpan)

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

public Microsoft.ServiceBus.Messaging.MessageSession AcceptMessageSession (TimeSpan serverWaitTime);
Parameters
serverWaitTime
TimeSpan

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

Returns

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

Exceptions

Thrown if serverWaitTime is not a positive TimeSpan value.

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

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

AcceptMessageSession(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.

public Microsoft.ServiceBus.Messaging.MessageSession AcceptMessageSession (string sessionId, TimeSpan serverWaitTime);
Parameters
sessionId
String

The session identifier of the message session.

serverWaitTime
TimeSpan

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

Returns

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

Exceptions

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

Thrown if serverWaitTime is not a positive TimeSpan value.

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

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