Share via


SessionClient Constructors

Definition

Overloads

SessionClient(ServiceBusConnectionStringBuilder, ReceiveMode, RetryPolicy, Int32)

Creates a new SessionClient from a ServiceBusConnectionStringBuilder

SessionClient(ServiceBusConnection, String, ReceiveMode, RetryPolicy, Int32)

Creates a new SessionClient on a given ServiceBusConnection

SessionClient(String, String, ReceiveMode, RetryPolicy, Int32)

Creates a new SessionClient from a specified connection string and entity path.

SessionClient(String, String, ITokenProvider, TransportType, ReceiveMode, RetryPolicy, Int32)

Creates a new SessionClient from a specified endpoint, entity path, and token provider.

SessionClient(ServiceBusConnectionStringBuilder, ReceiveMode, RetryPolicy, Int32)

Source:
SessionClient.cs

Creates a new SessionClient from a ServiceBusConnectionStringBuilder

public SessionClient (Microsoft.Azure.ServiceBus.ServiceBusConnectionStringBuilder connectionStringBuilder, Microsoft.Azure.ServiceBus.ReceiveMode receiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Microsoft.Azure.ServiceBus.RetryPolicy retryPolicy = default, int prefetchCount = 0);
new Microsoft.Azure.ServiceBus.SessionClient : Microsoft.Azure.ServiceBus.ServiceBusConnectionStringBuilder * Microsoft.Azure.ServiceBus.ReceiveMode * Microsoft.Azure.ServiceBus.RetryPolicy * int -> Microsoft.Azure.ServiceBus.SessionClient
Public Sub New (connectionStringBuilder As ServiceBusConnectionStringBuilder, Optional receiveMode As ReceiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Optional retryPolicy As RetryPolicy = Nothing, Optional prefetchCount As Integer = 0)

Parameters

connectionStringBuilder
ServiceBusConnectionStringBuilder

The ServiceBusConnectionStringBuilder having entity level connection details.

receiveMode
ReceiveMode

The Microsoft.Azure.ServiceBus.SessionClient.ReceiveMode used to specify how messages are received. Defaults to PeekLock mode.

retryPolicy
RetryPolicy

The RetryPolicy that will be used when communicating with ServiceBus. Defaults to Default

prefetchCount
Int32

The Microsoft.Azure.ServiceBus.SessionClient.PrefetchCount that specifies the upper limit of messages the session object will actively receive regardless of whether a receive operation is pending. Defaults to 0.

Remarks

Creates a new connection to the entity, which is used for all the sessions objects accepted using this client.

Applies to

SessionClient(ServiceBusConnection, String, ReceiveMode, RetryPolicy, Int32)

Source:
SessionClient.cs

Creates a new SessionClient on a given ServiceBusConnection

public SessionClient (Microsoft.Azure.ServiceBus.ServiceBusConnection serviceBusConnection, string entityPath, Microsoft.Azure.ServiceBus.ReceiveMode receiveMode, Microsoft.Azure.ServiceBus.RetryPolicy retryPolicy = default, int prefetchCount = 0);
new Microsoft.Azure.ServiceBus.SessionClient : Microsoft.Azure.ServiceBus.ServiceBusConnection * string * Microsoft.Azure.ServiceBus.ReceiveMode * Microsoft.Azure.ServiceBus.RetryPolicy * int -> Microsoft.Azure.ServiceBus.SessionClient
Public Sub New (serviceBusConnection As ServiceBusConnection, entityPath As String, receiveMode As ReceiveMode, Optional retryPolicy As RetryPolicy = Nothing, Optional prefetchCount As Integer = 0)

Parameters

serviceBusConnection
ServiceBusConnection

Connection object to the service bus namespace.

entityPath
String

The path of the entity for this receiver. For Queues this will be the name, but for Subscriptions this will be the full path.

receiveMode
ReceiveMode

The Microsoft.Azure.ServiceBus.SessionClient.ReceiveMode used to specify how messages are received. Defaults to PeekLock mode.

retryPolicy
RetryPolicy

The RetryPolicy that will be used when communicating with ServiceBus. Defaults to Default

prefetchCount
Int32

The Microsoft.Azure.ServiceBus.SessionClient.PrefetchCount that specifies the upper limit of messages the session object will actively receive regardless of whether a receive operation is pending. Defaults to 0.

Applies to

SessionClient(String, String, ReceiveMode, RetryPolicy, Int32)

Source:
SessionClient.cs

Creates a new SessionClient from a specified connection string and entity path.

public SessionClient (string connectionString, string entityPath, Microsoft.Azure.ServiceBus.ReceiveMode receiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Microsoft.Azure.ServiceBus.RetryPolicy retryPolicy = default, int prefetchCount = 0);
new Microsoft.Azure.ServiceBus.SessionClient : string * string * Microsoft.Azure.ServiceBus.ReceiveMode * Microsoft.Azure.ServiceBus.RetryPolicy * int -> Microsoft.Azure.ServiceBus.SessionClient
Public Sub New (connectionString As String, entityPath As String, Optional receiveMode As ReceiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Optional retryPolicy As RetryPolicy = Nothing, Optional prefetchCount As Integer = 0)

Parameters

connectionString
String

Namespace connection string used to communicate with Service Bus. Must not contain entity details.

entityPath
String

The path of the entity for this receiver. For Queues this will be the name, but for Subscriptions this will be the full path.

receiveMode
ReceiveMode

The Microsoft.Azure.ServiceBus.SessionClient.ReceiveMode used to specify how messages are received. Defaults to PeekLock mode.

retryPolicy
RetryPolicy

The RetryPolicy that will be used when communicating with ServiceBus. Defaults to Default

prefetchCount
Int32

The Microsoft.Azure.ServiceBus.SessionClient.PrefetchCount that specifies the upper limit of messages the session object will actively receive regardless of whether a receive operation is pending. Defaults to 0.

Remarks

Creates a new connection to the entity, which is used for all the sessions objects accepted using this client.

Applies to

SessionClient(String, String, ITokenProvider, TransportType, ReceiveMode, RetryPolicy, Int32)

Source:
SessionClient.cs

Creates a new SessionClient from a specified endpoint, entity path, and token provider.

public SessionClient (string endpoint, string entityPath, Microsoft.Azure.ServiceBus.Primitives.ITokenProvider tokenProvider, Microsoft.Azure.ServiceBus.TransportType transportType = Microsoft.Azure.ServiceBus.TransportType.Amqp, Microsoft.Azure.ServiceBus.ReceiveMode receiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Microsoft.Azure.ServiceBus.RetryPolicy retryPolicy = default, int prefetchCount = 0);
new Microsoft.Azure.ServiceBus.SessionClient : string * string * Microsoft.Azure.ServiceBus.Primitives.ITokenProvider * Microsoft.Azure.ServiceBus.TransportType * Microsoft.Azure.ServiceBus.ReceiveMode * Microsoft.Azure.ServiceBus.RetryPolicy * int -> Microsoft.Azure.ServiceBus.SessionClient
Public Sub New (endpoint As String, entityPath As String, tokenProvider As ITokenProvider, Optional transportType As TransportType = Microsoft.Azure.ServiceBus.TransportType.Amqp, Optional receiveMode As ReceiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Optional retryPolicy As RetryPolicy = Nothing, Optional prefetchCount As Integer = 0)

Parameters

endpoint
String

Fully qualified domain name for Service Bus. Most likely, {yournamespace}.servicebus.windows.net

entityPath
String

Queue path.

tokenProvider
ITokenProvider

Token provider which will generate security tokens for authorization.

transportType
TransportType

Transport type.

receiveMode
ReceiveMode

Mode of receive of messages. Defaults to Microsoft.Azure.ServiceBus.SessionClient.ReceiveMode.PeekLock.

retryPolicy
RetryPolicy

Retry policy for queue operations. Defaults to Default

prefetchCount
Int32

The Microsoft.Azure.ServiceBus.SessionClient.PrefetchCount that specifies the upper limit of messages this receiver will actively receive regardless of whether a receive operation is pending. Defaults to 0.

Remarks

Creates a new connection to the entity, which is opened during the first operation.

Applies to