CQRS.NET  2.2
A lightweight enterprise framework to write CQRS, event-sourced and micro-service applications in hybrid multi-datacentre, on-premise and Azure environments.
Cqrs.Azure.ServiceBus.AzureBus< TAuthenticationToken > Class Template Referenceabstract

An Azure Bus such as a Service Bus or Event Hub. More...

+ Inheritance diagram for Cqrs.Azure.ServiceBus.AzureBus< TAuthenticationToken >:

Protected Member Functions

 AzureBus (IConfigurationManager configurationManager, IMessageSerialiser< TAuthenticationToken > messageSerialiser, IAuthenticationTokenHelper< TAuthenticationToken > authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, ILogger logger, bool isAPublisher)
 Instantiates a new instance of AzureBus<TAuthenticationToken> More...
 
virtual void SetConnectionStrings ()
 Sets ConnectionString from GetConnectionString. More...
 
virtual void SetNumberOfReceiversCount ()
 Sets NumberOfReceiversCount from GetCurrentNumberOfReceiversCount. More...
 
virtual void SetMaximumConcurrentReceiverProcessesCount ()
 Sets MaximumConcurrentReceiverProcessesCount from GetCurrentMaximumConcurrentReceiverProcessesCount. More...
 
abstract string GetConnectionString ()
 Gets the connection string for the bus. More...
 
virtual int GetCurrentNumberOfReceiversCount ()
 Returns DefaultNumberOfReceiversCount. More...
 
virtual int GetCurrentMaximumConcurrentReceiverProcessesCount ()
 Returns DefaultMaximumConcurrentReceiverProcessesCount. More...
 
abstract void InstantiatePublishing ()
 Instantiate publishing on this bus. More...
 
abstract void InstantiateReceiving ()
 Instantiate receiving on this bus. More...
 
virtual NamespaceManager GetNamespaceManager ()
 Creates a new instance of NamespaceManager with the ConnectionString. More...
 
virtual void StartSettingsChecking ()
 Starts a new Task that periodically calls ValidateSettingsHaveChanged and if there is a change, calls TriggerSettingsChecking. More...
 
virtual bool ValidateSettingsHaveChanged ()
 Checks if the settings for ConnectionString, NumberOfReceiversCount or MaximumConcurrentReceiverProcessesCount have changed. More...
 
virtual void UpdateSettings ()
 Calls SetConnectionStrings SetNumberOfReceiversCount and SetMaximumConcurrentReceiverProcessesCount More...
 
abstract void TriggerSettingsChecking ()
 Change the settings used by this bus. More...
 
abstract void ApplyReceiverMessageHandler ()
 Sets the handler on SubscriptionClient.OnMessage(System.Action<Microsoft.ServiceBus.Messaging.BrokeredMessage>). More...
 

Protected Attributes

const int DefaultNumberOfReceiversCount = 1
 The default number of receivers to start and run. More...
 
const int DefaultMaximumConcurrentReceiverProcessesCount = 1
 The default number for MaximumConcurrentReceiverProcessesCount. More...
 

Properties

string ConnectionString [get, set]
 Gets or sets the connection string to the bus. More...
 
IMessageSerialiser< TAuthenticationToken > MessageSerialiser [get]
 Gets or sets the IMessageSerialiser<TAuthenticationToken>. More...
 
IAuthenticationTokenHelper< TAuthenticationToken > AuthenticationTokenHelper [get]
 Gets or sets the IAuthenticationTokenHelper<TAuthenticationToken>. More...
 
ICorrelationIdHelper CorrelationIdHelper [get]
 Gets or sets the ICorrelationIdHelper. More...
 
ILogger Logger [get]
 Gets or sets the ILogger. More...
 
IConfigurationManager ConfigurationManager [get]
 Gets or sets the IConfigurationManager. More...
 
IDictionary< Guid, IList< IEvent< TAuthenticationToken > > > EventWaits [get]
 Gets or sets the events to wait for before responding to the caller keyed by the ICommand<TAuthenticationToken>.Id More...
 
int NumberOfReceiversCount [get, set]
 The number of receivers to start and run. More...
 
int MaximumConcurrentReceiverProcessesCount [get, set]
 The OnMessageOptions.MaxConcurrentCalls value. More...
 
bool AuthenticationTokenIsGuid [get]
 Indicates if the TAuthenticationToken is a Guid. More...
 
bool AuthenticationTokenIsInt [get]
 Indicates if the TAuthenticationToken is an int. More...
 
bool AuthenticationTokenIsString [get]
 Indicates if the TAuthenticationToken is a string. More...
 
virtual RetryPolicy AzureServiceBusRetryPolicy [get]
 Gets the default retry policy dedicated to handling transient conditions with Windows Azure Service Bus. More...
 

Detailed Description

An Azure Bus such as a Service Bus or Event Hub.

Template Parameters
TAuthenticationTokenThe Type of the authentication token.