Class AzureQueuedEventBusReceiver<TAuthenticationToken>
A concurrent implementation of AzureEventBusReceiver<TAuthenticationToken> that resides in memory.
Inheritance
System.Object
AzureBus<TAuthenticationToken>
AzureServiceBus<TAuthenticationToken>
AzureEventBus<TAuthenticationToken>
AzureEventBusReceiver<TAuthenticationToken>
AzureQueuedEventBusReceiver<TAuthenticationToken>
Inherited Members
Namespace: Cqrs.Azure.ServiceBus
Assembly: Cqrs.Azure.ServiceBus.dll
Syntax
public class AzureQueuedEventBusReceiver<TAuthenticationToken> : AzureEventBusReceiver<TAuthenticationToken>, IEventHandlerRegistrar, IHandlerRegistrar, IEventReceiver<TAuthenticationToken>, IEventReceiver
Type Parameters
Name | Description |
---|---|
TAuthenticationToken | The |
Constructors
AzureQueuedEventBusReceiver(IConfigurationManager, IMessageSerialiser<TAuthenticationToken>, IAuthenticationTokenHelper<TAuthenticationToken>, ICorrelationIdHelper, ILogger, IAzureBusHelper<TAuthenticationToken>, IBusHelper)
Instantiates a new instance of AzureQueuedEventBusReceiver<TAuthenticationToken>.
Declaration
public AzureQueuedEventBusReceiver(IConfigurationManager configurationManager, IMessageSerialiser<TAuthenticationToken> messageSerialiser, IAuthenticationTokenHelper<TAuthenticationToken> authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, ILogger logger, IAzureBusHelper<TAuthenticationToken> azureBusHelper, IBusHelper busHelper)
Parameters
Type | Name | Description |
---|---|---|
IConfigurationManager | configurationManager | |
IMessageSerialiser<TAuthenticationToken> | messageSerialiser | |
IAuthenticationTokenHelper<TAuthenticationToken> | authenticationTokenHelper | |
ICorrelationIdHelper | correlationIdHelper | |
ILogger | logger | |
IAzureBusHelper<TAuthenticationToken> | azureBusHelper | |
IBusHelper | busHelper |
Properties
QueueCount
The number of queues currently known.
Declaration
public int QueueCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
QueueNames
The name of all currently known queues.
Declaration
public ICollection<string> QueueNames { get; }
Property Value
Type | Description |
---|---|
ICollection<System.String> |
QueueTracker
Tracks all queues.
Declaration
protected static ConcurrentDictionary<string, ConcurrentQueue<IEvent<TAuthenticationToken>>> QueueTracker { get; }
Property Value
Type | Description |
---|---|
ConcurrentDictionary<System.String, ConcurrentQueue<IEvent<TAuthenticationToken>>> |
QueueTrackerLock
Gets the
Declaration
protected ReaderWriterLockSlim QueueTrackerLock { get; }
Property Value
Type | Description |
---|---|
ReaderWriterLockSlim |
Methods
CreateQueueAndAttachListenerIfNotExist(String)
Creates the queue of the name queueName
if it does not already exist,
the queue is attached to DequeuAndProcessEvent(String) using a
Declaration
protected void CreateQueueAndAttachListenerIfNotExist(string queueName)
Parameters
Type | Name | Description |
---|---|---|
System.String | queueName | The name of the queue to check and create. |
DequeuAndProcessEvent(String)
Takes an IEvent<TAuthenticationToken> off the queue of queueName
and calls ReceiveEvent(BrokeredMessage). Repeats in a loop until the queue is empty.
Declaration
protected void DequeuAndProcessEvent(string queueName)
Parameters
Type | Name | Description |
---|---|---|
System.String | queueName | The name of the queue process. |
ReceiveEvent(BrokeredMessage)
Receives a
Declaration
protected override void ReceiveEvent(BrokeredMessage message)
Parameters
Type | Name | Description |
---|---|---|
BrokeredMessage | message |
Overrides
Cqrs.Azure.ServiceBus.AzureEventBusReceiver<TAuthenticationToken>.ReceiveEvent(BrokeredMessage)