Table of Contents

Class AmazonQueue<TRequest>

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

Represents the base class from which all implementations in need of queue capabilities should derive.

public abstract class AmazonQueue<TRequest> : AmazonMessage<TRequest>, IConfigurable<AmazonMessageOptions>, IPointToPointChannel<TRequest>, ISender<TRequest>, IReceiver<TRequest> where TRequest : IRequest

Type Parameters

TRequest

The type of the model to handle.

Inheritance
AmazonMessage<TRequest>
AmazonQueue<TRequest>
Implements
ISender<TRequest>
IReceiver<TRequest>
Derived
Inherited Members

Constructors

AmazonQueue(IMarshaller, AmazonMessageOptions)

Initializes a new instance of the AmazonQueue<TRequest> class.

protected AmazonQueue(IMarshaller marshaller, AmazonMessageOptions options)

Parameters

marshaller IMarshaller

The IMarshaller that is used when converting models to messages.

options AmazonMessageOptions

The configured AmazonMessageOptions.

Exceptions

ArgumentNullException

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

ArgumentException

options are not in a valid state.

Methods

ReceiveAsync(Action<AsyncOptions>)

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

public abstract IAsyncEnumerable<IMessage<TRequest>> ReceiveAsync(Action<AsyncOptions> setup = null)

Parameters

setup Action<AsyncOptions>

The AsyncOptions which may be configured.

Returns

IAsyncEnumerable<IMessage<TRequest>>

A task that represents the asynchronous operation. The task result contains a sequence of IMessage<T> whose generic type argument is IRequest.

SendAsync(IEnumerable<IMessage<TRequest>>, Action<AsyncOptions>)

Sends the specified messages asynchronous using Point-to-Point Channel/P2P MEP.

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

Parameters

messages IEnumerable<IMessage<TRequest>>

The messages to send.

setup Action<AsyncOptions>

The AsyncOptions which may be configured.

Returns

Task

A task that represents the asynchronous operation.

See Also

AmazonMessage<TRequest>
IPointToPointChannel<TRequest>