Table of Contents

Class AwsSqsSnsOptions

Namespace
Excalibur.Dispatch.Transport.Aws
Assembly
Excalibur.Dispatch.Transport.AwsSqs.dll

Configuration options for AWS SNS topic integration with SQS transport.

public sealed class AwsSqsSnsOptions
Inheritance
AwsSqsSnsOptions
Inherited Members
Extension Methods

Remarks

This options class configures how the SQS transport integrates with SNS for pub/sub messaging patterns. It supports topic mappings, subscriptions, and filter policies for message routing.

All values are validated against AWS SNS constraints when set. Invalid values throw ArgumentException or ArgumentOutOfRangeException immediately (fail fast).

Fields

MaxFilterPolicyAttributes

The maximum number of filter policy conditions per subscription.

public const int MaxFilterPolicyAttributes = 5

Field Value

int

Remarks

AWS SNS limits filter policies to 5 attribute names with a total of 150 values.

MaxFilterPolicyValues

The maximum total values across all filter policy attributes.

public const int MaxFilterPolicyValues = 150

Field Value

int

MaxTopicPrefixLength

The maximum length for a topic prefix.

public const int MaxTopicPrefixLength = 256

Field Value

int

Properties

HasSubscriptions

Gets a value indicating whether any subscriptions are configured.

public bool HasSubscriptions { get; }

Property Value

bool

true if subscriptions exist; otherwise, false.

HasTopicMappings

Gets a value indicating whether any topic mappings are configured.

public bool HasTopicMappings { get; }

Property Value

bool

true if topic mappings exist; otherwise, false.

RawMessageDelivery

Gets or sets a value indicating whether to enable raw message delivery.

public bool RawMessageDelivery { get; set; }

Property Value

bool

true to deliver raw messages without SNS envelope; otherwise, false. Default is false.

Remarks

When raw message delivery is enabled, messages are delivered directly to SQS without the SNS notification envelope. This reduces message size overhead but removes access to SNS message attributes in the SQS message.

Subscriptions

Gets the list of SNS-to-SQS subscription configurations.

public List<AwsSqsSubscriptionOptions> Subscriptions { get; }

Property Value

List<AwsSqsSubscriptionOptions>

A list of subscription options.

Remarks

Each subscription defines how an SNS topic is connected to an SQS queue, including optional filter policies for message routing.

TopicMappings

Gets the message type to SNS topic ARN mappings.

public Dictionary<Type, string> TopicMappings { get; }

Property Value

Dictionary<Type, string>

A dictionary mapping message types to their SNS topic ARNs.

Remarks

Use MapTopic<TMessage>(string) to add mappings. When a mapping exists, messages of that type are published to the specified topic.