![]() |
VOOZH | about |
dotnet add package Rig.TUnit.Messaging.Sqs --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.Messaging.Sqs -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.Messaging.Sqs" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.Messaging.Sqs" Version="0.1.0-beta.2" />Directory.Packages.props
<PackageReference Include="Rig.TUnit.Messaging.Sqs" />Project file
paket add Rig.TUnit.Messaging.Sqs --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.Messaging.Sqs, 0.1.0-beta.2"
#:package Rig.TUnit.Messaging.Sqs@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.Messaging.Sqs&version=0.1.0-beta.2&prereleaseInstall as a Cake Addin
#tool nuget:?package=Rig.TUnit.Messaging.Sqs&version=0.1.0-beta.2&prereleaseInstall as a Cake Tool
LocalStack-backed Amazon SQS fixture with FIFO + standard queue topology,
MessageGroupId-aware listener, andOrderingAssertfor per-group strict ordering.
The Rig.TUnit Amazon SQS provider. SqsFixture spins the LocalStack
image with the SQS feature enabled and returns an IAmazonSQS pointing
at it. Ships async listener / sender helpers on AWSSDK.SQS. Ships:
SqsEventSender — sender with a SendContext overload mapping
SessionKey → MessageGroupId (mandatory on FIFO queues),
DeduplicationKey → MessageDeduplicationId. Throws
InvalidOperationException on FIFO queues when SessionKey is missing
— emulating the broker's precondition before round-trip.SqsListener — requests MessageGroupId + SequenceNumber
attributes on receive and populates CapturedMessage.SessionKey.SqsTopologyBuilder + provider-scoped interfaces
(ISqsTopologyBuilder, ISqsQueueConfig) wired via
SqsRigBuilder.WithTopology(…). WithFifo(contentBasedDeduplication)
appends the mandatory .fifo suffix and writes
FifoQueue=true; WithDeadLetter(name, maxReceiveCount) provisions
the redrive policy; WithVisibilityTimeout /
WithMessageRetentionPeriod map to the matching queue attributes.OrderingAssert — knows the FIFO-queue contract (per-
MessageGroupId strict ordering, otherwise best-effort).MessageGroupId.AWSSDK.SQS (transitive)using Rig.TUnit.Messaging.Helpers;
using Rig.TUnit.Messaging.Sqs.Fixtures;
using Rig.TUnit.Messaging.Sqs.Helpers;
await using var fx = new SqsFixture();
await fx.InitializeAsync();
var queue = await fx.Client.CreateQueueAsync("orders");
await using var sender = new SqsEventSender(fx.Client, queue.QueueUrl);
await sender.SendAsync(
"{\"orderId\":1}",
context: new SendContext(SessionKey: "customer-42"),
ct: ct);
FIFO queue + DLQ via the WithTopology rig hook (the .fifo suffix is
appended automatically by WithFifo):
services.AddRigTUnit(rig =>
rig.UseSqs(RigConnect.FromValue(fx.Endpoint), s =>
s.WithTopology(t =>
t.Queue("orders-dlq")
.Queue("orders", c => c
.WithFifo(contentBasedDeduplication: true)
.WithDeadLetter("orders-dlq", maxReceiveCount: 5)
.WithVisibilityTimeout(TimeSpan.FromSeconds(30))))));
| Property | Type | Default | Description |
|---|---|---|---|
Image |
string |
"localstack/localstack:3" |
LocalStack image |
StartupTimeoutSeconds |
int |
120 |
LocalStack boot |
Region |
string |
"us-east-1" |
Region label |
AccessKeyId |
string |
"test" |
LocalStack default |
SecretAccessKey |
string |
"test" |
LocalStack default |
Rig.TUnit.Messaging.Sqs.Fixtures.SqsFixtureRig.TUnit.Messaging.Sqs.Options.SqsFixtureOptionsRig.TUnit.Messaging.Sqs.Builder.SqsRigBuilder — ships
WithTopology(Action<ISqsTopologyBuilder>).Rig.TUnit.Messaging.Sqs.Helpers.SqsListener — populates
CapturedMessage.SessionKey from MessageGroupId.Rig.TUnit.Messaging.Sqs.Helpers.SqsEventSender — ships
SendAsync(string, SendContext, …) overload.Rig.TUnit.Messaging.Sqs.Topology.ISqsTopologyBuilderRig.TUnit.Messaging.Sqs.Topology.ISqsQueueConfig — WithFifo,
WithVisibilityTimeout, WithDeadLetter,
WithMessageRetentionPeriod.Rig.TUnit.Messaging.Sqs.Topology.SqsTopologyBuilderPer-test queue name: orders_{IsolationKey:short}.fifo or .std.
LocalStack supports queue create/delete at high concurrency, so
parallelism is effectively unbounded.
WaitTimeSeconds=0 on the receive
request.MessageGroupId on send; SqsEventSender sets it from the
IsolationKey by default, overridable.See .
.fifo; standard queues must not.
ISqsQueueConfig.WithFifo() appends the suffix automatically — do
not pass "orders.fifo" to Queue("orders", c => c.WithFifo()).MessageGroupId on every send;
SqsEventSender.SendAsync(SendContext) enforces this and throws
InvalidOperationException before the broker round-trip when
SessionKey is missing on a .fifo queue.ContentBasedDeduplication=true
on queue creation — pass WithFifo(contentBasedDeduplication: true).SendContext.PartitionKey is meaningless on SQS (no partitioned
primitive); the sender ignores it on standard and FIFO queues.WithTopology
declaration succeeds via CreateQueueAsync returning the existing
queue URL when attributes match.See ;
baseline in benchmarks/baseline-005.json.
MIT. See .
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Rig.TUnit.Messaging.Sqs:
| Package | Downloads |
|---|---|
|
Rig.TUnit.All
Meta-package containing every Rig.TUnit.* package. DISCOURAGED — prefer per-feature or per-stack meta-packages (Rig.TUnit, Rig.TUnit.Microservices). |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.2 | 72 | 4/27/2026 |
| 0.0.0-alpha.0.14 | 67 | 4/26/2026 |