Table of Contents

Class AmazonEventBusOptions

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

Configuration options for AmazonEventBus.

public class AmazonEventBusOptions : AmazonMessageOptions, IValidatableParameterObject, IParameterObject
Inheritance
AmazonEventBusOptions
Implements
Derived
Inherited Members

Examples

Configure AmazonEventBusOptions for an SNS/SQS event bus by providing AWS credentials, endpoint, and source queue URL. Adjust the polling timeout and visibility timeout via ReceiveContext.

using System;
using Amazon;
using Amazon.Runtime;
using Savvyio.Extensions.SimpleQueueService.EventDriven;

namespace ExampleApp;

public class AmazonEventBusConfig
{
    public static AmazonEventBusOptions CreateOptions()
    {
        var options = new AmazonEventBusOptions
        {
            Credentials = new AnonymousAWSCredentials(),
            Endpoint = RegionEndpoint.EUWest1,
            SourceQueue = new Uri("https://sqs.eu-west-1.amazonaws.com/123456789012/account-events")
        };
        options.ReceiveContext.PollingTimeout = TimeSpan.FromSeconds(20);
        options.ReceiveContext.VisibilityTimeout = TimeSpan.FromSeconds(30);
        return options;
    }
}

See Also