Class MessagingFactory
- Namespace
- Microsoft.ServiceBus.Messaging
- Assembly
- Microsoft.ServiceBus.dll
Represents a messaging factory. This is the anchor class used for run-time operations that send and receive messages to and from Service Bus queues, topics, or subscriptions.
public abstract class MessagingFactory : ClientEntity
- Inheritance
-
MessagingFactory
- Inherited Members
Properties
Address
Gets the base address of the messaging factory.
public Uri Address { get; }
Property Value
- Uri
A URI that represents the base address of the messaging factory.
NamespaceEndpoints
Gets a list of namespace endpoints.
public IEnumerable<Uri> NamespaceEndpoints { get; }
Property Value
- IEnumerable<Uri>
A list of namespace endpoints.
PrefetchCount
Gets or sets the number of messages that the message receiver can simultaneously request.
public virtual int PrefetchCount { get; set; }
Property Value
- int
The number of messages that the message receiver can simultaneously request.
Methods
AcceptMessageSession()
Returns available sessions across all session-enabled subscriptions and queues in the service namespace.
public MessageSession AcceptMessageSession()
Returns
- MessageSession
A MessageSession that allows grouping of related messages for processing in a single transaction.
AcceptMessageSession(TimeSpan)
Returns available sessions across all session-enabled subscriptions and queues in the service namespace.
public MessageSession AcceptMessageSession(TimeSpan serverWaitTime)
Parameters
serverWaitTime
TimeSpanThe processing time out.
Returns
- MessageSession
A MessageSession that allows grouping of related messages for processing in a single transaction.
AcceptMessageSessionAsync()
Asynchronously returns available sessions across all session-enabled subscriptions and queues in the service namespace.
public Task<MessageSession> AcceptMessageSessionAsync()
Returns
- Task<MessageSession>
A task instance that represents the asynchronous operation for accept message session.
AcceptMessageSessionAsync(TimeSpan)
Asynchronously returns available sessions across all session-enabled subscriptions and queues in the service namespace.
public Task<MessageSession> AcceptMessageSessionAsync(TimeSpan serverWaitTime)
Parameters
serverWaitTime
TimeSpan
Returns
- Task<MessageSession>
A task instance that represents the asynchronous operation for accept message session.
Create()
Creates a new messaging factory object.
public static MessagingFactory Create()
Returns
- MessagingFactory
The newly created MessagingFactory object.
Create(IEnumerable<string>)
Creates a new MessagingFactory object.
public static MessagingFactory Create(IEnumerable<string> addresses)
Parameters
addresses
IEnumerable<string>An enumeration of base addresses.
Returns
- MessagingFactory
The newly created MessagingFactory object.
Create(IEnumerable<string>, MessagingFactorySettings)
Creates a new MessagingFactory object.
public static MessagingFactory Create(IEnumerable<string> addresses, MessagingFactorySettings factorySettings)
Parameters
addresses
IEnumerable<string>An enumeration of base addresses.
factorySettings
MessagingFactorySettingsThe factory settings.
Returns
- MessagingFactory
The newly created MessagingFactory object.
Create(IEnumerable<string>, TokenProvider)
Creates a new MessagingFactory object.
public static MessagingFactory Create(IEnumerable<string> addresses, TokenProvider tokenProvider)
Parameters
addresses
IEnumerable<string>An enumeration of base addresses.
tokenProvider
TokenProviderThe token provider.
Returns
- MessagingFactory
The newly created MessagingFactory object.
Create(IEnumerable<Uri>)
Creates a new MessagingFactory object.
public static MessagingFactory Create(IEnumerable<Uri> addresses)
Parameters
addresses
IEnumerable<Uri>An enumeration of address.
Returns
- MessagingFactory
The newly created MessagingFactory object.
Create(IEnumerable<Uri>, MessagingFactorySettings)
Creates a new MessagingFactory object.
public static MessagingFactory Create(IEnumerable<Uri> addresses, MessagingFactorySettings factorySettings)
Parameters
addresses
IEnumerable<Uri>An enumeration of address.
factorySettings
MessagingFactorySettingsThe factory settings.
Returns
- MessagingFactory
The newly created MessagingFactory object.
Create(IEnumerable<Uri>, TokenProvider)
Creates a new MessagingFactory object.
public static MessagingFactory Create(IEnumerable<Uri> addresses, TokenProvider tokenProvider)
Parameters
addresses
IEnumerable<Uri>An enumeration of address.
tokenProvider
TokenProviderThe token provider.
Returns
- MessagingFactory
The newly created MessagingFactory object.
Create(string)
Creates a new MessagingFactory object.
public static MessagingFactory Create(string address)
Parameters
address
stringThe base address of the service namespace.
Returns
- MessagingFactory
The newly created MessagingFactory object.
Create(string, MessagingFactorySettings)
Creates a new MessagingFactory object.
public static MessagingFactory Create(string address, MessagingFactorySettings factorySettings)
Parameters
address
stringThe base address of the service namespace.
factorySettings
MessagingFactorySettingsThe MessagingFactory settings.
Returns
- MessagingFactory
The newly created MessagingFactory object.
Exceptions
- UriFormatException
Thrown when
address
is empty.- ArgumentNullException
Thrown when
factorySettings
oraddress
are null.- ArgumentException
address
contains a path appended to the full address of the service namespace.
Create(string, TokenProvider)
Creates a new MessagingFactory object.
public static MessagingFactory Create(string address, TokenProvider tokenProvider)
Parameters
address
stringThe base address of the namespace.
tokenProvider
TokenProviderThe token provider.
Returns
- MessagingFactory
The newly created MessagingFactory object.
Exceptions
- ArgumentException
address
contains a path appended to the full address of the service namespace.- UriFormatException
Thrown when
address
is empty.- ArgumentNullException
Thrown when
tokenProvider
oraddress
are null.
Create(Uri)
Creates a new MessagingFactory object.
public static MessagingFactory Create(Uri address)
Parameters
address
UriThe namespace base address.
Returns
- MessagingFactory
The newly created MessagingFactory object.
Create(Uri, MessagingFactorySettings)
Creates a new MessagingFactory object.
public static MessagingFactory Create(Uri address, MessagingFactorySettings factorySettings)
Parameters
address
UriThe namespace base address.
factorySettings
MessagingFactorySettingsThe MessagingFactory settings.
Returns
- MessagingFactory
The newly created MessagingFactory object.
Exceptions
- ArgumentNullException
Thrown when
address
orfactorySettings
is null.- ArgumentException
address
contains a path appended to the full address of the service namespace.
Create(Uri, TokenProvider)
Creates a new MessagingFactory object.
public static MessagingFactory Create(Uri address, TokenProvider tokenProvider)
Parameters
address
UriThe base address of the namespace.
tokenProvider
TokenProviderThe token provider.
Returns
- MessagingFactory
The newly created MessagingFactory object.
Exceptions
- ArgumentException
address
contains a path appended to the full address of the service namespace.- ArgumentNullException
Thrown when
tokenProvider
oraddress
are null.
CreateAsync(IEnumerable<string>)
Asynchronously creates a new messaging factory object.
public static Task<MessagingFactory> CreateAsync(IEnumerable<string> addresses)
Parameters
addresses
IEnumerable<string>An enumeration of base addresses.
Returns
- Task<MessagingFactory>
A task instance that represents the asynchronous create operation.
CreateAsync(IEnumerable<string>, MessagingFactorySettings)
Asynchronously creates a new messaging factory object.
public static Task<MessagingFactory> CreateAsync(IEnumerable<string> addresses, MessagingFactorySettings factorySettings)
Parameters
addresses
IEnumerable<string>An enumeration of base addresses.
factorySettings
MessagingFactorySettingsThe MessagingFactory settings.
Returns
- Task<MessagingFactory>
A task instance that represents the asynchronous create operation.
CreateAsync(IEnumerable<string>, TokenProvider)
Asynchronously creates a new messaging factory object.
public static Task<MessagingFactory> CreateAsync(IEnumerable<string> addresses, TokenProvider tokenProvider)
Parameters
addresses
IEnumerable<string>An enumeration of base addresses.
tokenProvider
TokenProviderThe token provider.
Returns
- Task<MessagingFactory>
A task instance that represents the asynchronous create operation.
CreateAsync(IEnumerable<Uri>)
Asynchronously creates a new messaging factory object.
public static Task<MessagingFactory> CreateAsync(IEnumerable<Uri> addresses)
Parameters
addresses
IEnumerable<Uri>An enumeration of address.
Returns
- Task<MessagingFactory>
A task instance that represents the asynchronous create operation.
CreateAsync(IEnumerable<Uri>, MessagingFactorySettings)
Asynchronously creates a new messaging factory object.
public static Task<MessagingFactory> CreateAsync(IEnumerable<Uri> addresses, MessagingFactorySettings factorySettings)
Parameters
addresses
IEnumerable<Uri>An enumeration of address.
factorySettings
MessagingFactorySettingsThe MessagingFactory settings.
Returns
- Task<MessagingFactory>
A task instance that represents the asynchronous create operation.
CreateAsync(IEnumerable<Uri>, TokenProvider)
Asynchronously creates a new messaging factory object.
public static Task<MessagingFactory> CreateAsync(IEnumerable<Uri> addresses, TokenProvider tokenProvider)
Parameters
addresses
IEnumerable<Uri>An enumeration of address.
tokenProvider
TokenProviderThe token provider.
Returns
- Task<MessagingFactory>
A task instance that represents the asynchronous create operation.
CreateAsync(string)
Asynchronously creates a new messaging factory object.
public static Task<MessagingFactory> CreateAsync(string address)
Parameters
address
stringThe base address of the service namespace.
Returns
- Task<MessagingFactory>
A task instance that represents the asynchronous create operation.
CreateAsync(string, MessagingFactorySettings)
Asynchronously creates a new messaging factory object.
public static Task<MessagingFactory> CreateAsync(string address, MessagingFactorySettings factorySettings)
Parameters
address
stringThe base address of the service namespace.
factorySettings
MessagingFactorySettingsThe MessagingFactory settings.
Returns
- Task<MessagingFactory>
A task instance that represents the asynchronous create operation.
CreateAsync(string, TokenProvider)
Asynchronously creates a new messaging factory object.
public static Task<MessagingFactory> CreateAsync(string address, TokenProvider tokenProvider)
Parameters
address
stringThe base address of the service namespace.
tokenProvider
TokenProviderThe token provider.
Returns
- Task<MessagingFactory>
A task instance that represents the asynchronous create operation.
CreateAsync(Uri)
Asynchronously creates a new messaging factory object.
public static Task<MessagingFactory> CreateAsync(Uri address)
Parameters
address
UriThe namespace base address.
Returns
- Task<MessagingFactory>
A task instance that represents the asynchronous create operation.
CreateAsync(Uri, MessagingFactorySettings)
Asynchronously creates a new messaging factory object.
public static Task<MessagingFactory> CreateAsync(Uri address, MessagingFactorySettings factorySettings)
Parameters
address
UriThe namespace base address.
factorySettings
MessagingFactorySettingsThe MessagingFactory settings.
Returns
- Task<MessagingFactory>
A task instance that represents the asynchronous create operation.
CreateAsync(Uri, TokenProvider)
Asynchronously creates a new messaging factory object.
public static Task<MessagingFactory> CreateAsync(Uri address, TokenProvider tokenProvider)
Parameters
address
UriThe namespace base address.
tokenProvider
TokenProviderThe token provider.
Returns
- Task<MessagingFactory>
A task instance that represents the asynchronous create operation.
CreateEventHubClient(string)
Creates a new EventHubClient object using the specified path.
public EventHubClient CreateEventHubClient(string path)
Parameters
path
stringThe path to the Event Hub.
Returns
- EventHubClient
The newly created EventHubClient object.
Exceptions
- ArgumentNullException
Thrown if
path
is null.
CreateFromConnectionString(string)
Creates a new MessagingFactory object from a connection string.
public static MessagingFactory CreateFromConnectionString(string connectionString)
Parameters
connectionString
stringThe connection string.
Returns
- MessagingFactory
The newly created MessagingFactory object.
CreateMessageReceiver(string)
Creates a message receiver.
public MessageReceiver CreateMessageReceiver(string entityPath)
Parameters
entityPath
stringThe path of the entity.
Returns
- MessageReceiver
The newly created message receiver.
CreateMessageReceiver(string, ReceiveMode)
Creates a message receiver.
public MessageReceiver CreateMessageReceiver(string entityPath, ReceiveMode receiveMode)
Parameters
entityPath
stringThe path of the entity.
receiveMode
ReceiveModeThe receive mode.
Returns
- MessageReceiver
The newly created message receiver.
CreateMessageReceiverAsync(string)
Asynchronously creates a message receiver.
public Task<MessageReceiver> CreateMessageReceiverAsync(string entityPath)
Parameters
entityPath
stringThe path of the entity.
Returns
- Task<MessageReceiver>
A task instance that represents the asynchronous create message receiver operation.
CreateMessageReceiverAsync(string, ReceiveMode)
Asynchronously creates a message receiver.
public Task<MessageReceiver> CreateMessageReceiverAsync(string entityPath, ReceiveMode receiveMode)
Parameters
entityPath
stringThe path of the entity.
receiveMode
ReceiveModeThe receive mode.
Returns
- Task<MessageReceiver>
A task instance that represents the asynchronous create message receiver operation.
CreateMessageSender(string)
Creates a message sender.
public MessageSender CreateMessageSender(string entityPath)
Parameters
entityPath
stringThe path of the entity.
Returns
- MessageSender
The newly created message sender.
CreateMessageSender(string, string)
Creates a message sender.
public MessageSender CreateMessageSender(string transferDestinationEntityPath, string viaEntityPath)
Parameters
transferDestinationEntityPath
stringThe transfer destination entity path.
viaEntityPath
stringThe via-entity path.
Returns
- MessageSender
The created MessageSender object.
CreateMessageSenderAsync(string)
Asynchronously creates a message sender.
public Task<MessageSender> CreateMessageSenderAsync(string entityPath)
Parameters
entityPath
stringThe path of the entity.
Returns
- Task<MessageSender>
A task instance that represents the asynchronous create message sender operation.
CreateMessageSenderAsync(string, string)
Asynchronously creates a message sender.
public Task<MessageSender> CreateMessageSenderAsync(string transferDestinationEntityPath, string viaEntityPath)
Parameters
transferDestinationEntityPath
stringThe transfer destination entity path.
viaEntityPath
stringThe via-entity path.
Returns
- Task<MessageSender>
A task instance that represents the asynchronous create message sender operation.
CreateQueueClient(string)
Creates a new queue client.
public QueueClient CreateQueueClient(string path)
Parameters
path
stringThe path of the queue relative to the service namespace base address.
Returns
- QueueClient
The newly created queue client.
Exceptions
- ArgumentException
path
is null or empty.- ArgumentOutOfRangeException
path
length is greater than TopicNameMaximumLength.- TimeoutException
The operation times out. The timeout period is initialized through the MessagingFactorySettings object. You may need to increase the value of OperationTimeout to avoid this exception if the timeout value is relatively low.
- MessagingException
An internal error or unexpected exception occurs.
- OperationCanceledException
The factory has been closed or aborted.
CreateQueueClient(string, ReceiveMode)
Creates a new queue client.
public QueueClient CreateQueueClient(string path, ReceiveMode receiveMode)
Parameters
path
stringThe path of the queue relative to the service namespace base address.
receiveMode
ReceiveModeThe receive mode.
Returns
- QueueClient
The newly created queue client.
Exceptions
- ArgumentException
path
is null or empty.- ArgumentOutOfRangeException
path
length is greater than TopicNameMaximumLength.- TimeoutException
The operation times out. The timeout period is initialized through the MessagingFactorySettings object. You may need to increase the value of OperationTimeout to avoid this exception if the timeout value is relatively low.
- MessagingException
An internal error or unexpected exception occurs.
- OperationCanceledException
The factory has been closed or aborted.
CreateSubscriptionClient(string, string)
Creates a subscription client.
public SubscriptionClient CreateSubscriptionClient(string topicPath, string name)
Parameters
topicPath
stringThe topic path relative to the service namespace.
name
stringThe name of the subscription.
Returns
- SubscriptionClient
The newly created subscription client.
Exceptions
- ArgumentException
The supplied
topicPath
is null or empty.- ArgumentOutOfRangeException
The length of
topicPath
is greater than TopicNameMaximumLength.- TimeoutException
The operation times out. The timeout period is initialized through the MessagingFactorySettings object. You may need to increase the value of OperationTimeout to avoid this exception if the timeout value is relatively low.
- MessagingException
An internal error or unexpected exception occurs.
- OperationCanceledException
The factory has been closed or aborted.
CreateSubscriptionClient(string, string, ReceiveMode)
Creates a new subscription client.
public SubscriptionClient CreateSubscriptionClient(string topicPath, string name, ReceiveMode receiveMode)
Parameters
topicPath
stringThe topic path relative to the service namespace.
name
stringThe name of the subscription.
receiveMode
ReceiveModeThe receive mode.
Returns
- SubscriptionClient
The newly created subscription client.
Exceptions
- ArgumentException
The supplied
topicPath
is null or empty.- ArgumentOutOfRangeException
The length of
topicPath
is greater than TopicNameMaximumLength.- TimeoutException
The operation times out. The timeout period is initialized through the MessagingFactorySettings object. You may need to increase the value of OperationTimeout to avoid this exception if the timeout value is relatively low.
- MessagingException
An internal error or unexpected exception occurs.
- OperationCanceledException
The factory has been closed or aborted.
CreateTopicClient(string)
Creates a new topic client.
public TopicClient CreateTopicClient(string path)
Parameters
path
stringThe topic path relative to the service namespace base address.
Returns
- TopicClient
The newly created topic client.
Exceptions
- ArgumentNullException
The supplied
path
is null.- TimeoutException
The operation times out. The timeout period is initialized through the MessagingFactorySettings object. You may need to increase the value of OperationTimeout to avoid this exception if the timeout value is relatively low.
- MessagingException
An internal error or unexpected exception occurs.
- OperationCanceledException
The factory has been closed or aborted.
GetSettings()
Retrieves a copy of the settings of the messaging factory.
public MessagingFactorySettings GetSettings()
Returns
- MessagingFactorySettings
A copy of the messaging factory settings.
IncrementConnectionResetCount(Uri)
protected void IncrementConnectionResetCount(Uri endpoint)
Parameters
endpoint
Uri
OnAbort()
Executes the abort action.
protected override void OnAbort()
OnAcceptMessageSession(ReceiveMode, TimeSpan, TimeSpan)
Executes the accept message session.
protected virtual MessageSession OnAcceptMessageSession(ReceiveMode receiveMode, TimeSpan serverWaitTime, TimeSpan timeout)
Parameters
receiveMode
ReceiveModeThe message receive mode.
serverWaitTime
TimeSpanThe server wait time.
timeout
TimeSpanThe operation timeout.
Returns
- MessageSession
The executed message session.
OnAcceptSessionReceiver(string, string, ReceiveMode, TimeSpan)
Executes the accept session receiver action.
protected virtual MessageSession OnAcceptSessionReceiver(string entityName, string sessionId, ReceiveMode receiveMode, TimeSpan timeout)
Parameters
entityName
stringThe name of the entity.
sessionId
stringThe session identifier.
receiveMode
ReceiveModeThe message receive mode.
timeout
TimeSpanThe wait time before the operation times out.
Returns
- MessageSession
An IAsyncResult object that references the asynchronous accept session receiver action.
OnBeginAcceptMessageSession(ReceiveMode, TimeSpan, TimeSpan, AsyncCallback, object)
Executes the begin accept message session action.
protected abstract IAsyncResult OnBeginAcceptMessageSession(ReceiveMode receiveMode, TimeSpan serverWaitTime, TimeSpan timeout, AsyncCallback callback, object state)
Parameters
receiveMode
ReceiveModeThe receive mode.
serverWaitTime
TimeSpanThe server wait time.
timeout
TimeSpanThe operation timeout.
callback
AsyncCallbackThe asynchronous callback.
state
objectThe session state.
Returns
- IAsyncResult
The asynchronous result of the operation.
OnBeginAcceptSessionReceiver(string, string, ReceiveMode, TimeSpan, AsyncCallback, object)
Executes the begin accept session receiver action.
protected abstract IAsyncResult OnBeginAcceptSessionReceiver(string entityName, string sessionId, ReceiveMode receiveMode, TimeSpan timeout, AsyncCallback callback, object state)
Parameters
entityName
stringThe name of the entity.
sessionId
stringThe session identifier.
receiveMode
ReceiveModeThe message receive mode.
timeout
TimeSpanThe wait time before the operation times out.
callback
AsyncCallbackAn AsyncCallback delegate that references the method to invoke when the operation is complete.
state
objectA user-defined object that contains information about the receive operation.
Returns
- IAsyncResult
An IAsyncResult object that references the asynchronous accept session receiver action.
OnBeginClose(TimeSpan, AsyncCallback, object)
Executes the begin close action.
protected override IAsyncResult OnBeginClose(TimeSpan timeout, AsyncCallback callback, object state)
Parameters
timeout
TimeSpanThe timeout.
callback
AsyncCallbackThe callback.
state
objectThe state.
Returns
- IAsyncResult
An IAsyncResult object that references the asynchronous close action.
OnBeginCreateMessageReceiver(string, ReceiveMode, TimeSpan, AsyncCallback, object)
Executes the begin create message receiver action.
protected abstract IAsyncResult OnBeginCreateMessageReceiver(string entityName, ReceiveMode receiveMode, TimeSpan timeout, AsyncCallback callback, object state)
Parameters
entityName
stringThe name of the entity.
receiveMode
ReceiveModeThe message receive mode.
timeout
TimeSpanThe wait time before the operation times out.
callback
AsyncCallbackAn AsyncCallback delegate that references the method to invoke when the operation is complete.
state
objectA user-defined object that contains information about the receive operation.
Returns
- IAsyncResult
An IAsyncResult object that references the asynchronous create message receiver action.
OnBeginCreateMessageSender(string, string, TimeSpan, AsyncCallback, object)
Executes the begin create message sender action.
protected abstract IAsyncResult OnBeginCreateMessageSender(string transferDestinationEntityName, string viaEntityName, TimeSpan timeout, AsyncCallback callback, object state)
Parameters
transferDestinationEntityName
stringThe name of the transfer destination entity.
viaEntityName
stringThe via-entity name.
timeout
TimeSpanThe timeout.
callback
AsyncCallbackThe callback message.
state
objectThe state.
Returns
- IAsyncResult
An IAsyncResult object that references the asynchronous create message sender action.
OnBeginCreateMessageSender(string, TimeSpan, AsyncCallback, object)
Executes the begin create message sender action.
protected virtual IAsyncResult OnBeginCreateMessageSender(string entityName, TimeSpan timeout, AsyncCallback callback, object state)
Parameters
entityName
stringThe name of the entity.
timeout
TimeSpanThe timeout.
callback
AsyncCallbackThe callback.
state
objectThe state.
Returns
- IAsyncResult
An IAsyncResult object that references the asynchronous create message sender action.
OnClose(TimeSpan)
Executes the close action.
protected override void OnClose(TimeSpan timeout)
Parameters
timeout
TimeSpanThe timeout.
OnCreateEventHubClient(string)
Executes the create event hub client action.
protected virtual EventHubClient OnCreateEventHubClient(string path)
Parameters
path
stringThe path of the event hub client.
Returns
- EventHubClient
The created EventHubClient.
OnCreateMessageReceiver(string, ReceiveMode, TimeSpan)
Executes the create message receiver action.
protected virtual MessageReceiver OnCreateMessageReceiver(string entityName, ReceiveMode receiveMode, TimeSpan timeout)
Parameters
entityName
stringThe name of the entity.
receiveMode
ReceiveModeThe message receive mode.
timeout
TimeSpanThe timeout.
Returns
- MessageReceiver
An IAsyncResult object that references the asynchronous create message receiver action.
OnCreateMessageSender(string, string, TimeSpan)
Executes the create message sender action.
protected virtual MessageSender OnCreateMessageSender(string transferDestinationEntityName, string viaEntityName, TimeSpan timeout)
Parameters
transferDestinationEntityName
stringThe name of the transfer destination entity.
viaEntityName
stringThe via-entity name.
timeout
TimeSpanThe message timeout.
Returns
- MessageSender
The executed MessageSender action.
OnCreateMessageSender(string, TimeSpan)
Executes the create message sender action.
protected virtual MessageSender OnCreateMessageSender(string entityName, TimeSpan timeout)
Parameters
Returns
- MessageSender
An IAsyncResult object that references the asynchronous create message sender action.
OnCreateQueueClient(string, ReceiveMode)
Executes the create queue client action.
protected virtual QueueClient OnCreateQueueClient(string path, ReceiveMode receiveMode)
Parameters
path
stringThe path of the queue relative to the service namespace base address.
receiveMode
ReceiveModeThe receive mode.
Returns
- QueueClient
The newly created queue client.
OnCreateSubscriptionClient(string, ReceiveMode)
Executes a create subscription client action.
protected virtual SubscriptionClient OnCreateSubscriptionClient(string subscriptionPath, ReceiveMode receiveMode)
Parameters
subscriptionPath
stringThe subscription path.
receiveMode
ReceiveModeThe receive mode.
Returns
- SubscriptionClient
A newly created subscription client.
OnCreateSubscriptionClient(string, string, ReceiveMode)
Executes a create subscription client action.
protected virtual SubscriptionClient OnCreateSubscriptionClient(string topicPath, string name, ReceiveMode receiveMode)
Parameters
topicPath
stringThe path of the subscription relative to the service namespace base address.
name
stringThe name of the subscription.
receiveMode
ReceiveModeThe receive mode.
Returns
- SubscriptionClient
A newly created subscription client.
OnCreateTopicClient(string)
Executes the create topic client action.
protected virtual TopicClient OnCreateTopicClient(string path)
Parameters
path
stringThe path of the topic relative to the service namespace base address.
Returns
- TopicClient
The newly created topic client.
OnEndAcceptMessageSession(IAsyncResult)
Executes the end accept message session action.
protected abstract MessageSession OnEndAcceptMessageSession(IAsyncResult result)
Parameters
result
IAsyncResultThe result of the operation.
Returns
- MessageSession
The executed MessageSession action.
OnEndAcceptSessionReceiver(IAsyncResult)
Executes the end accept session receiver action.
protected abstract MessageSession OnEndAcceptSessionReceiver(IAsyncResult result)
Parameters
result
IAsyncResultAn IAsyncResult object that stores state information and any user-defined data for this asynchronous operation.
Returns
- MessageSession
The executed Microsoft.ServiceBus.Messaging.SessionReceiver object.
OnEndClose(IAsyncResult)
Executes the end close action.
protected override void OnEndClose(IAsyncResult result)
Parameters
result
IAsyncResultThe result.
OnEndCreateMessageReceiver(IAsyncResult)
Executes the end create message receiver action.
protected abstract MessageReceiver OnEndCreateMessageReceiver(IAsyncResult result)
Parameters
result
IAsyncResultThe result.
Returns
- MessageReceiver
The executed MessageReceiver action.
OnEndCreateMessageSender(IAsyncResult)
Executes the end create message sender action.
protected abstract MessageSender OnEndCreateMessageSender(IAsyncResult result)
Parameters
result
IAsyncResultThe result.
Returns
- MessageSender
The executed MessageSender action.
PairNamespaceAsync(PairedNamespaceOptions)
Asynchronously pairs a namespace.
public Task PairNamespaceAsync(PairedNamespaceOptions options)
Parameters
options
PairedNamespaceOptionsThe pairing options.
Returns
- Task
The result of the operation.
ResetConnection()
public virtual void ResetConnection()