NexJob.Trigger.AwsSqs
6.7.0
dotnet add package NexJob.Trigger.AwsSqs --version 6.7.0
NuGet\Install-Package NexJob.Trigger.AwsSqs -Version 6.7.0
<PackageReference Include="NexJob.Trigger.AwsSqs" Version="6.7.0" />
<PackageVersion Include="NexJob.Trigger.AwsSqs" Version="6.7.0" />
<PackageReference Include="NexJob.Trigger.AwsSqs" />
paket add NexJob.Trigger.AwsSqs --version 6.7.0
#r "nuget: NexJob.Trigger.AwsSqs, 6.7.0"
#:package NexJob.Trigger.AwsSqs@6.7.0
#addin nuget:?package=NexJob.Trigger.AwsSqs&version=6.7.0
#tool nuget:?package=NexJob.Trigger.AwsSqs&version=6.7.0
NexJob.Trigger.AwsSqs
AWS SQS trigger for NexJob. Receives messages from an SQS queue and automatically enqueues them as NexJob jobs.
Installation
dotnet add package NexJob.Trigger.AwsSqs
Usage
Basic Setup
using NexJob.Trigger.AwsSqs;
builder.Services.AddNexJobAwsSqsTrigger(options =>
{
options.QueueUrl = "https://sqs.us-east-1.amazonaws.com/123456789/my-queue";
options.JobName = typeof(MyJob).AssemblyQualifiedName!;
});
With Custom SQS Client
var sqsClient = new AmazonSQSClient(RegionEndpoint.USEast1);
builder.Services.AddNexJobAwsSqsTrigger(sqsClient, options =>
{
options.QueueUrl = "https://sqs.us-east-1.amazonaws.com/123456789/my-queue";
options.JobName = typeof(MyJob).AssemblyQualifiedName!;
options.MaxMessages = 5;
options.WaitTimeSeconds = 20;
});
You can also bind the trigger to one job type with the generic overload, which sets JobName for you:
builder.Services.AddNexJobAwsSqsTrigger<ProcessOrderJob>(sqsClient, options =>
{
options.QueueUrl = "https://sqs.us-east-1.amazonaws.com/123456789/my-queue";
});
SQS does not read a job type from the message attributes: every message on the queue runs the configured job. The job idempotency key is the SQS MessageId.
Configuration Options
| Option | Description | Default |
|---|---|---|
QueueUrl |
SQS queue URL (required) | - |
JobName |
Assembly-qualified job type name (required) | - |
MaxMessages |
Max messages per batch (1–10) | 10 |
WaitTimeSeconds |
Long polling wait time (0–20) | 20 |
VisibilityTimeoutSeconds |
Message visibility timeout | 30 |
VisibilityExtensionIntervalSeconds |
Extension loop interval | 15 |
TargetQueue |
NexJob target queue name; "default" is the application's default queue ({prefix}.default) |
"default" |
JobPriority |
Job execution priority | Normal |
Broker Guarantees
This trigger satisfies all 5 NexJob trigger guarantees:
- At-least-once delivery — messages are never lost before enqueue
- Visibility extension — messages stay invisible while processing via
ChangeMessageVisibilityAsync - Explicit ack — messages deleted only after
EnqueueAsyncsucceeds - Dead-letter on poison — failed messages reappear and eventually route to DLQ via SQS redrive policy
- Graceful shutdown —
CancellationTokenrespected, in-flight messages not abandoned
Trace Propagation
The trigger extracts W3C traceparent from SQS message attributes and propagates it to the JobRecord. Set the traceparent message attribute when sending to SQS:
await sqsClient.SendMessageAsync(new SendMessageRequest
{
QueueUrl = queueUrl,
MessageBody = payload,
MessageAttributes = new Dictionary<string, MessageAttributeValue>
{
["traceparent"] = new MessageAttributeValue
{
DataType = "String",
StringValue = Activity.Current?.Id,
},
},
});
Strongly-Typed Consumer Registration
You can bind a strongly-typed job consumer directly using the generic overload:
builder.Services.AddNexJobAwsSqsTrigger<ProcessOrderSqsJob>(options =>
{
options.QueueUrl = "https://sqs.us-east-1.amazonaws.com/.../orders";
options.TargetQueue = "orders";
});
Operational Visibility
This trigger registers with IListenerRegistry to report live connection states (Starting, Listening, Reconnecting, Faulted, Stopped) directly to the Dashboard /listeners page and the Cluster Pipeline Topology Map.
Known Limitations
- SQS FIFO queues: Deduplication relies on SQS
MessageId. For FIFO queues,MessageDeduplicationIdcan also be used — this is not yet exposed as an option. - No batching: Messages are processed one at a time to ensure visibility extension and proper ordering.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- AWSSDK.SQS (>= 3.7.502.57)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0)
- NexJob (>= 6.7.0)
-
net8.0
- AWSSDK.SQS (>= 3.7.502.57)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
- Microsoft.Extensions.Options (>= 8.0.2)
- Microsoft.Extensions.Options.DataAnnotations (>= 8.0.0)
- NexJob (>= 6.7.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.7.0 | 81 | 10/19/2026 |
| 6.6.0 | 89 | 10/18/2026 |
| 6.5.1 | 90 | 10/17/2026 |
| 6.5.0 | 79 | 10/17/2026 |
| 6.4.0 | 84 | 10/16/2026 |
| 6.3.0 | 84 | 10/12/2026 |
| 6.2.1 | 83 | 10/11/2026 |
| 6.2.0 | 89 | 10/10/2026 |
| 6.1.0 | 84 | 10/10/2026 |
| 6.0.0 | 90 | 10/9/2026 |
| 5.10.0 | 89 | 10/8/2026 |
| 5.9.0 | 90 | 10/5/2026 |
| 5.8.0 | 99 | 10/4/2026 |
| 5.7.0 | 99 | 10/1/2026 |
| 5.6.2 | 91 | 10/1/2026 |
| 5.6.1 | 92 | 9/30/2026 |
| 5.6.0 | 89 | 9/30/2026 |
| 5.5.0 | 98 | 9/25/2026 |
| 5.4.1 | 91 | 9/24/2026 |
| 5.4.0 | 94 | 9/24/2026 |