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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NexJob.Trigger.AwsSqs" Version="6.7.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NexJob.Trigger.AwsSqs" Version="6.7.0" />
                    
Directory.Packages.props
<PackageReference Include="NexJob.Trigger.AwsSqs" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NexJob.Trigger.AwsSqs --version 6.7.0
                    
#r "nuget: NexJob.Trigger.AwsSqs, 6.7.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NexJob.Trigger.AwsSqs@6.7.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NexJob.Trigger.AwsSqs&version=6.7.0
                    
Install as a Cake Addin
#tool nuget:?package=NexJob.Trigger.AwsSqs&version=6.7.0
                    
Install as a Cake Tool

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:

  1. At-least-once delivery — messages are never lost before enqueue
  2. Visibility extension — messages stay invisible while processing via ChangeMessageVisibilityAsync
  3. Explicit ack — messages deleted only after EnqueueAsync succeeds
  4. Dead-letter on poison — failed messages reappear and eventually route to DLQ via SQS redrive policy
  5. Graceful shutdown — CancellationToken respected, 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, MessageDeduplicationId can 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed