NexJob.Trigger.AzureServiceBus 5.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package NexJob.Trigger.AzureServiceBus --version 5.2.0
                    
NuGet\Install-Package NexJob.Trigger.AzureServiceBus -Version 5.2.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.AzureServiceBus" Version="5.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NexJob.Trigger.AzureServiceBus" Version="5.2.0" />
                    
Directory.Packages.props
<PackageReference Include="NexJob.Trigger.AzureServiceBus" />
                    
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.AzureServiceBus --version 5.2.0
                    
#r "nuget: NexJob.Trigger.AzureServiceBus, 5.2.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.AzureServiceBus@5.2.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.AzureServiceBus&version=5.2.0
                    
Install as a Cake Addin
#tool nuget:?package=NexJob.Trigger.AzureServiceBus&version=5.2.0
                    
Install as a Cake Tool

NexJob.Trigger.AzureServiceBus

Azure Service Bus trigger for NexJob. Receives messages from an ASB queue or topic and automatically enqueues them as NexJob jobs.

Installation

dotnet add package NexJob.Trigger.AzureServiceBus

Usage

Queue Setup

using NexJob.Trigger.AzureServiceBus;

builder.Services.AddNexJobAzureServiceBusTrigger(options =>
{
    options.ConnectionString = "Endpoint=sb://...";
    options.QueueOrTopicName = "my-queue";
});

Topic and Subscription Setup

builder.Services.AddNexJobAzureServiceBusTrigger(options =>
{
    options.ConnectionString = "Endpoint=sb://...";
    options.QueueOrTopicName = "my-topic";
    options.SubscriptionName = "my-sub";
    options.MaxConcurrentMessages = 5;
});

Configuration Options

Option Description Default
ConnectionString Azure Service Bus connection string (required) -
QueueOrTopicName Name of the queue or topic (required) -
SubscriptionName Subscription name (required for topics) null
MaxConcurrentMessages Max concurrent messages 1
TargetQueue NexJob target queue name "default"
JobPriority Job execution priority Normal

Message Contract

The trigger expects messages with the following properties:

  • Body: The job input as a UTF-8 string (JSON).
  • ApplicationProperties:
    • nexjob.job_type: Assembly-qualified name of the job type (required).
    • traceparent: W3C traceparent for distributed tracing (optional).

Broker Guarantees

This trigger satisfies all 5 NexJob trigger guarantees adapted for Service Bus:

  1. At-least-once delivery — messages are never lost before enqueue. Uses PeekLock mode.
  2. Lock renewal — messages stay locked while processing. The SDK handles lock renewal automatically.
  3. Explicit ack — messages completed (CompleteAsync) only after EnqueueAsync succeeds.
  4. Dead-letter on failure — failed enqueues result in AbandonAsync, eventually routing to DLQ after max delivery count.
  5. Graceful shutdown — CancellationToken respected, processor stops accepting new messages and waits for in-flight ones.

Trace Propagation

The trigger extracts W3C traceparent from ApplicationProperties and propagates it to the JobRecord.

var message = new ServiceBusMessage(payload);
message.ApplicationProperties["nexjob.job_type"] = typeof(MyJob).AssemblyQualifiedName;
message.ApplicationProperties["traceparent"] = Activity.Current?.Id;

await sender.SendMessageAsync(message);

Known Limitations

  • Fixed input type: The inputType is fixed to string because broker triggers receive the message body as text (JSON). Deserializing to a concrete type is the responsibility of the job handler.
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 was computed.  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
5.10.0 35 10/8/2026
5.9.0 54 10/5/2026
5.8.0 92 10/4/2026
5.7.0 81 10/1/2026
5.6.2 82 10/1/2026
5.6.1 85 9/30/2026
5.6.0 81 9/30/2026
5.5.0 80 9/25/2026
5.4.1 81 9/24/2026
5.4.0 89 9/24/2026
5.3.0 95 9/21/2026
5.2.0 97 9/20/2026
5.1.0 94 9/17/2026
5.0.0 104 9/17/2026
4.0.1 93 9/17/2026
4.0.0 150 4/21/2026
3.0.0 132 4/16/2026
0.0.0-alpha.0 53 9/17/2026