UKBatch.Transport.RabbitMQ 0.2.2-alpha

This is a prerelease version of UKBatch.Transport.RabbitMQ.
dotnet add package UKBatch.Transport.RabbitMQ --version 0.2.2-alpha
                    
NuGet\Install-Package UKBatch.Transport.RabbitMQ -Version 0.2.2-alpha
                    
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="UKBatch.Transport.RabbitMQ" Version="0.2.2-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="UKBatch.Transport.RabbitMQ" Version="0.2.2-alpha" />
                    
Directory.Packages.props
<PackageReference Include="UKBatch.Transport.RabbitMQ" />
                    
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 UKBatch.Transport.RabbitMQ --version 0.2.2-alpha
                    
#r "nuget: UKBatch.Transport.RabbitMQ, 0.2.2-alpha"
                    
#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 UKBatch.Transport.RabbitMQ@0.2.2-alpha
                    
#: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=UKBatch.Transport.RabbitMQ&version=0.2.2-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=UKBatch.Transport.RabbitMQ&version=0.2.2-alpha&prerelease
                    
Install as a Cake Tool

UKBatch.Transport.RabbitMQ

License: MIT

RabbitMQ (AMQP) transport adapter for the UKBatch batch / job orchestration ecosystem. Implements ITransport over a broker so a batch can dispatch a step to a different microservice through durable, persistent messaging.

v0.1.0-alpha — broker-backed cross-service transport. Same JobMessage / JobResult envelope as UKBatch.Transport.Http, different wire.

What is UKBatch.Transport.RabbitMQ?

UKBatch.Transport.RabbitMQ lets two (or more) UKBatch-hosting microservices talk to each other through a RabbitMQ broker instead of point-to-point HTTP. The orchestrator publishes a JobMessage; the broker routes it to the target service's durable queue; the worker consumes, runs the job, and (for request/reply steps) returns a JobResult.

Position in the package family:

UKBatch.Abstractions       (zero-dep interfaces)
UKBatch.Core               (runtime, scheduler, in-memory stores, in-process transport)
UKBatch.AspNetCore         (IHostedService, DI integration)
UKBatch.Transport.Http     (cross-service ITransport over HTTP)
UKBatch.Transport.RabbitMQ (cross-service ITransport over AMQP)   ← this package
UKBatch.Storage.EntityFrameworkCore (PostgreSQL / SQLite)

Install

dotnet add package UKBatch.Abstractions
dotnet add package UKBatch.Core
dotnet add package UKBatch.AspNetCore
dotnet add package UKBatch.Transport.RabbitMQ

Quickstart

using UKBatch.AspNetCore;
using UKBatch.Transport.RabbitMQ;

var builder = WebApplication.CreateBuilder(args);

builder.AddUKBatchAspNetCore(b =>
{
    b.Configure(o => o.ThisServiceName = "billing-worker");   // = service queue name suffix
    b.AddJob<InvoiceProcessingJob>().Named("InvoiceProcessing");
});

// Replace the default InProcessTransport singleton with the RabbitMQ adapter.
builder.Services.AddUKBatchRabbitMqTransport(opts =>
{
    opts.Uri = builder.Configuration["UKBatch:Transport:RabbitMQ:Uri"];   // amqp://user:pass@host:5672/vhost
    // or discrete fields: opts.HostName / opts.UserName / opts.Password / opts.UseTls
});

var app = builder.Build();
app.Run();

The orchestrator side configures the same way but targets a worker via a cross-service step (.OnService("billing-worker")), exactly as with the HTTP transport — only the job NAME is shared.

Topology

Declared idempotently on connect:

Object Default name Type Notes
Job exchange ukbatch.jobs direct, durable routing key = target service name
Service queue ukbatch.service.{serviceName} durable quorum x-delivery-limit (broker-enforced) → DLX on exhaustion
Dead-letter exchange ukbatch.jobs.dlx fanout, durable
Dead-letter queue ukbatch.dlq durable bound to the DLX
Reply amq.rabbitmq.reply-to built-in direct-reply-to request/reply, no queue declared

All names are overridable through RabbitMqTransportOptions.

Delivery semantics

  • Durable + persistent: messages survive a broker restart (Persistent + quorum queue).
  • Publisher confirms: every publish awaits the broker ack — "sent but not stored" is impossible.
  • Manual ack, no requeue: the worker acks after the job reaches a terminal state (Completed or Failed). A failed job flows back as a JobResult (driving the batch OnFailure branch); it does not go to the DLQ.
  • Effectively-once: a per-service MessageId dedupe cache replays the cached result on a duplicate delivery instead of re-running the job (in-memory in v0.1; persistent dedupe is a v0.2 concern).
  • Dead-letter is narrow: only poison messages (undeserializable / unregistered job) and broker delivery-limit exhaustion reach ukbatch.dlq.

Security

There is no application-level HMAC — trust lives at the broker layer. Provision a dedicated user/password (not guest) and enable TLS (opts.UseTls = true or an amqps:// URI) in production.

Configuration options

RabbitMqTransportOptions binds from UKBatch:Transport:RabbitMQ. Defaults:

Option Default Purpose
Uri null Full AMQP URI (takes precedence over discrete fields)
HostName / Port / VirtualHost / UserName / Password / UseTls localhost / 5672 / / / guest / guest / false Discrete connection fields
ExchangeName / DeadLetterExchangeName / DeadLetterQueueName / QueuePrefix ukbatch.jobs / ukbatch.jobs.dlx / ukbatch.dlq / ukbatch.service. Topology names
PrefetchCount 16 Max unacked deliveries in flight
MaxRedeliveryCount 5 Broker delivery-limit before dead-lettering
DefaultRequestTimeout 30s Request/reply wall-clock timeout
PublisherConfirmTimeout 10s Per-publish confirm wait (validated; not yet wired — the confirm wait is currently bounded by the caller token)
MessageIdCacheCapacity 4096 Receiver-side dedupe LRU size
ConsumerDispatchConcurrency 1 Parallel consumer dispatch per channel

Limitations & roadmap

  • v0.1-alpha: in-memory MessageId dedupe (resets on process restart).
  • v0.2: persistent dedupe, shared-secret/credential rotation, OpenTelemetry instrumentation, per-service distinct resilience pipelines, durable workflow resume.

License & support

MIT licensed. Source code, samples, issue tracker:

Contributions welcome.

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
0.2.2-alpha 61 6/18/2026
0.2.1-alpha 53 6/15/2026
0.2.0-alpha 53 6/14/2026
0.1.6-alpha 57 6/13/2026
0.1.5-alpha 54 6/12/2026
0.1.4-alpha 56 6/10/2026
0.1.3-alpha 56 6/8/2026
0.1.1-alpha 57 6/8/2026
0.1.0-alpha 55 6/6/2026