Table of Contents

Class AwsSqsQueueOptions

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

Configuration options for standard AWS SQS queue settings.

public sealed class AwsSqsQueueOptions
Inheritance
AwsSqsQueueOptions
Inherited Members
Extension Methods

Remarks

These settings control how messages are handled in the SQS queue, including visibility timeout, message retention, and optional dead-letter queue configuration.

All values are validated against AWS SQS constraints when set. Invalid values will throw ArgumentOutOfRangeException immediately (fail fast).

Fields

DefaultDelaySeconds

The default delay seconds (0 - no delay).

public const int DefaultDelaySeconds = 0

Field Value

int

DefaultMessageRetentionPeriod

The default message retention period (4 days).

public static readonly TimeSpan DefaultMessageRetentionPeriod

Field Value

TimeSpan

DefaultReceiveWaitTimeSeconds

The default receive wait time (0 seconds - short polling).

public const int DefaultReceiveWaitTimeSeconds = 0

Field Value

int

DefaultVisibilityTimeout

The default visibility timeout (30 seconds).

public static readonly TimeSpan DefaultVisibilityTimeout

Field Value

TimeSpan

MaxDelaySeconds

The maximum delay seconds (900 - 15 minutes).

public const int MaxDelaySeconds = 900

Field Value

int

MaxMessageRetentionPeriod

The maximum message retention period allowed by SQS (14 days).

public static readonly TimeSpan MaxMessageRetentionPeriod

Field Value

TimeSpan

MaxReceiveWaitTimeSeconds

The maximum receive wait time (20 seconds - long polling).

public const int MaxReceiveWaitTimeSeconds = 20

Field Value

int

MaxVisibilityTimeout

The maximum visibility timeout allowed by SQS (12 hours).

public static readonly TimeSpan MaxVisibilityTimeout

Field Value

TimeSpan

MinDelaySeconds

The minimum delay seconds (0 - no delay).

public const int MinDelaySeconds = 0

Field Value

int

MinMessageRetentionPeriod

The minimum message retention period allowed by SQS (1 minute).

public static readonly TimeSpan MinMessageRetentionPeriod

Field Value

TimeSpan

MinReceiveWaitTimeSeconds

The minimum receive wait time (0 seconds - short polling).

public const int MinReceiveWaitTimeSeconds = 0

Field Value

int

MinVisibilityTimeout

The minimum visibility timeout allowed by SQS (0 seconds).

public static readonly TimeSpan MinVisibilityTimeout

Field Value

TimeSpan

Properties

DeadLetterQueue

Gets or sets the dead-letter queue configuration.

public AwsSqsDeadLetterOptions? DeadLetterQueue { get; set; }

Property Value

AwsSqsDeadLetterOptions

The dead-letter queue options, or null if no DLQ is configured.

Remarks

When configured, messages that fail processing after the specified maximum receive count are automatically moved to the dead-letter queue for later analysis or reprocessing.

DelaySeconds

Gets or sets the delay in seconds before messages become available for consumption.

public int DelaySeconds { get; set; }

Property Value

int

A value between 0 and 900 seconds (15 minutes). Default is 0 (no delay).

Remarks

When set to a value greater than 0, messages sent to the queue will be invisible for the specified number of seconds before becoming available for consumption.

This is useful for implementing delayed message processing scenarios.

Exceptions

ArgumentOutOfRangeException

Thrown when the value is less than 0 or greater than 900.

HasDeadLetterQueue

Gets a value indicating whether a dead-letter queue is configured.

public bool HasDeadLetterQueue { get; }

Property Value

bool

true if a dead-letter queue is configured; otherwise, false.

MessageRetentionPeriod

Gets or sets the message retention period for the queue.

public TimeSpan MessageRetentionPeriod { get; set; }

Property Value

TimeSpan

A value between 1 minute and 14 days. Default is 4 days.

Remarks

The message retention period is the length of time that SQS retains a message in the queue. After this period, the message is automatically deleted.

This setting affects all messages in the queue, not just individual messages.

Exceptions

ArgumentOutOfRangeException

Thrown when the value is less than 1 minute or greater than 14 days.

ReceiveWaitTimeSeconds

Gets or sets the receive wait time in seconds for long polling.

public int ReceiveWaitTimeSeconds { get; set; }

Property Value

int

A value between 0 and 20 seconds. Default is 0 (short polling).

Remarks

When set to a value greater than 0, enables long polling which reduces the cost of using SQS by eliminating the number of empty responses and false empty responses.

Long polling (up to 20 seconds) is recommended for most use cases as it reduces costs and allows consumers to receive messages as soon as they arrive.

Exceptions

ArgumentOutOfRangeException

Thrown when the value is less than 0 or greater than 20.

VisibilityTimeout

Gets or sets the visibility timeout for messages in the queue.

public TimeSpan VisibilityTimeout { get; set; }

Property Value

TimeSpan

A value between 0 seconds and 12 hours. Default is 30 seconds.

Remarks

The visibility timeout is the length of time that a message received from a queue will be invisible to other receiving components. During this time, the original consumer can process and delete the message.

If the message is not deleted within the visibility timeout, it becomes visible again and may be received by another consumer.

Exceptions

ArgumentOutOfRangeException

Thrown when the value is less than 0 or greater than 12 hours.