Class AzureCommandQueue
- Namespace
- Savvyio.Extensions.QueueStorage.Commands
- Assembly
- Savvyio.Extensions.QueueStorage.dll
Provides an Azure Storage Queue implementation of the IPointToPointChannel<TRequest>.
public class AzureCommandQueue : AzureQueue<ICommand>, IPointToPointChannel<ICommand>, ISender<ICommand>, IReceiver<ICommand>, IHealthCheckProvider<QueueServiceClient>
- Inheritance
-
AzureCommandQueue
- Implements
- Derived
- Inherited Members
Constructors
AzureCommandQueue(IMarshaller, AzureQueueOptions)
Initializes a new instance of the AzureCommandQueue class.
public AzureCommandQueue(IMarshaller marshaller, AzureQueueOptions options)
Parameters
marshallerIMarshallerThe marshaller used for serializing and deserializing messages.
optionsAzureQueueOptionsThe AzureQueueOptions used to configure this instance.
Exceptions
- ArgumentNullException
marshallercannot be null - or -optionscannot be null.- ArgumentException
optionsare not in a valid state.
Methods
GetHealthCheckTarget()
Gets the QueueServiceClient instance used for probing the health status of the Azure Storage Queue service.
public QueueServiceClient GetHealthCheckTarget()
Returns
- QueueServiceClient
The QueueServiceClient instance representing the client connection to the Azure Storage Queue service.
ReceiveAsync(Action<AsyncOptions>)
Receives messages from the Azure Storage Queue.
public IAsyncEnumerable<IMessage<ICommand>> ReceiveAsync(Action<AsyncOptions> setup = null)
Parameters
setupAction<AsyncOptions>The AsyncOptions which may be configured.
Returns
- IAsyncEnumerable<IMessage<ICommand>>
A task that represents the asynchronous operation. The task result contains a sequence of IMessage<T> whose generic type argument is ICommand.
SendAsync(IEnumerable<IMessage<ICommand>>, Action<AsyncOptions>)
Sends the specified messages to the Azure Storage Queue.
public Task SendAsync(IEnumerable<IMessage<ICommand>> messages, Action<AsyncOptions> setup = null)
Parameters
messagesIEnumerable<IMessage<ICommand>>The messages to send.
setupAction<AsyncOptions>The AsyncOptions which may be configured.
Returns
- Task
A task that represents the asynchronous operation.
Exceptions
- ArgumentNullException
messagescannot be null.