Table of Contents

Class AmazonEventBus

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

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

public class AmazonEventBus : AmazonBus<IIntegrationEvent>, IConfigurable<AmazonMessageOptions>, IPublishSubscribeChannel<IIntegrationEvent>, IPublisher<IIntegrationEvent>, ISubscriber<IIntegrationEvent>, IHealthCheckProvider<IAmazonSimpleNotificationService>
Inheritance
AmazonEventBus
Implements
Derived
Inherited Members

Constructors

AmazonEventBus(IMarshaller, AmazonEventBusOptions)

Initializes a new instance of the AmazonEventBus class.

public AmazonEventBus(IMarshaller marshaller, AmazonEventBusOptions options)

Parameters

marshaller IMarshaller

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

options AmazonEventBusOptions

The AmazonEventBusOptions 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 IAmazonSimpleNotificationService client instance configured for health probing of the underlying Amazon SNS service.

public IAmazonSimpleNotificationService GetHealthCheckTarget()

Returns

IAmazonSimpleNotificationService

An IAmazonSimpleNotificationService client instance used to probe the health status of the notification service.

PublishAsync(IMessage<IIntegrationEvent>, Action<AsyncOptions>)

Publishes the specified event asynchronous using Publish-Subscribe Channel/Pub-Sub MEP.

public override Task PublishAsync(IMessage<IIntegrationEvent> @event, Action<AsyncOptions> setup = null)

Parameters

event IMessage<IIntegrationEvent>

The event to publish.

setup Action<AsyncOptions>

The AsyncOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

SubscribeAsync(Func<IMessage<IIntegrationEvent>, CancellationToken, Task>, Action<SubscribeAsyncOptions>)

Subscribe to one or more message(s) asynchronous using Publish-Subscribe Channel/Pub-Sub MEP.

public override Task SubscribeAsync(Func<IMessage<IIntegrationEvent>, CancellationToken, Task> asyncHandler, Action<SubscribeAsyncOptions> setup = null)

Parameters

asyncHandler Func<IMessage<IIntegrationEvent>, CancellationToken, Task>

The function delegate that will handle the message.

setup Action<SubscribeAsyncOptions>

The SubscribeAsyncOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.

See Also

AmazonBus<TRequest>