Table of Contents

Class AwsSqsFilterPolicyOptions

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

Configuration options for an SNS subscription filter policy.

public sealed class AwsSqsFilterPolicyOptions
Inheritance
AwsSqsFilterPolicyOptions
Inherited Members
Extension Methods

Remarks

Filter policies use JSON format with operators for matching message attributes. AWS supports operators including exact match, prefix, exists, numeric comparisons, and logical combinations.

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

Properties

Conditions

Gets the filter conditions organized by attribute name.

public Dictionary<string, List<AwsSqsFilterCondition>> Conditions { get; }

Property Value

Dictionary<string, List<AwsSqsFilterCondition>>

A dictionary mapping attribute names to their filter conditions.

Remarks

Each attribute can have multiple conditions that are OR'd together. Conditions across different attributes are AND'd together.

HasConditions

Gets a value indicating whether any filter conditions are configured.

public bool HasConditions { get; }

Property Value

bool

true if conditions exist; otherwise, false.

Scope

Gets or sets the filter policy scope.

public AwsSqsFilterPolicyScope Scope { get; set; }

Property Value

AwsSqsFilterPolicyScope

The scope for filter evaluation. Default is MessageAttributes.

Remarks

MessageAttributes filters on SNS message attributes. MessageBody filters on the message body (requires JSON).

Methods

ToJson()

Converts the filter policy to AWS JSON format.

[RequiresUnreferencedCode("Uses untyped JsonSerializer.Serialize with Dictionary<string, object> which requires runtime type metadata for polymorphic values.")]
[RequiresDynamicCode("Uses untyped JsonSerializer.Serialize which may require dynamic code generation for polymorphic serialization.")]
public string ToJson()

Returns

string

The filter policy as a JSON string.