Table of Contents

Class AmazonCommandQueue

Namespace
Savvyio.Extensions.SimpleQueueService.Commands
Assembly
Savvyio.Extensions.SimpleQueueService.dll

Provides a default implementation of the AmazonQueue<TRequest> class tailored for messages holding an ICommand implementation.

public class AmazonCommandQueue : AmazonQueue<ICommand>, IConfigurable<AmazonMessageOptions>, IPointToPointChannel<ICommand>, ISender<ICommand>, IReceiver<ICommand>, IHealthCheckProvider<IAmazonSQS>
Inheritance
AmazonCommandQueue
Implements
Derived
Inherited Members

Constructors

AmazonCommandQueue(IMarshaller, AmazonCommandQueueOptions)

Initializes a new instance of the AmazonCommandQueue class.

public AmazonCommandQueue(IMarshaller marshaller, AmazonCommandQueueOptions options)

Parameters

marshaller IMarshaller

The IMarshaller that is used when converting ICommand implementations to messages.

options AmazonCommandQueueOptions

The AmazonCommandQueueOptions 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()

Returns a new IAmazonSQS client instance configured for health probing of the underlying Amazon SQS service.

public IAmazonSQS GetHealthCheckTarget()

Returns

IAmazonSQS

An IAmazonSQS client instance used to probe the health status of the queue service.

ReceiveAsync(Action<AsyncOptions>)

Receive one or more command(s) asynchronous using Point-to-Point Channel/P2P MEP.

public override 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 whose generic type argument is ICommand asynchronous using Point-to-Point Channel/P2P MEP.

public override Task SendAsync(IEnumerable<IMessage<ICommand>> messages, Action<AsyncOptions> setup = null)

Parameters

messages IEnumerable<IMessage<ICommand>>

The ICommand enclosed 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.

See Also

AmazonQueue<TRequest>