Table of Contents

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

marshaller IMarshaller

The marshaller used for serializing and deserializing messages.

options AzureQueueOptions

The AzureQueueOptions used to configure this instance.

Exceptions

ArgumentNullException

marshaller cannot be null - or - options cannot be null.

ArgumentException

options are 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

setup Action<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

messages IEnumerable<IMessage<ICommand>>

The messages to send.

setup Action<AsyncOptions>

The AsyncOptions which may be configured.

Returns

Task

A task that represents the asynchronous operation.

Exceptions

ArgumentNullException

messages cannot be null.