UKBatch.Abstractions 0.2.2-alpha

This is a prerelease version of UKBatch.Abstractions.
dotnet add package UKBatch.Abstractions --version 0.2.2-alpha
                    
NuGet\Install-Package UKBatch.Abstractions -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.Abstractions" 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.Abstractions" Version="0.2.2-alpha" />
                    
Directory.Packages.props
<PackageReference Include="UKBatch.Abstractions" />
                    
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.Abstractions --version 0.2.2-alpha
                    
#r "nuget: UKBatch.Abstractions, 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.Abstractions@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.Abstractions&version=0.2.2-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=UKBatch.Abstractions&version=0.2.2-alpha&prerelease
                    
Install as a Cake Tool

UKBatch.Abstractions

The zero-dependency contract surface for UKBatch — a lightweight, pluggable batch/job orchestration library for .NET 8 and .NET 10. This package is interfaces, attributes, and DTOs only: IJob, IPartitionedJob<TItem>, [Job], JobContext, JobParameters, and the storage/transport contracts every other UKBatch.* package builds on.

Reference it from a shared contracts assembly when you want to define jobs without pulling in the runtime — for example a library project that several services consume.

Status: part of the UKBatch 0.1.0-alpha package family.

Install

dotnet add package UKBatch.Abstractions

Quick example

Declare a job against the contract. Nothing here executes — the type is just metadata plus a method the runtime will call later.

using UKBatch.Abstractions.Jobs;

[Job(Name = "DailyReport", Schedule = "0 0 9 * * *", MaxRetries = 3)]
public sealed class DailyReportJob : IJob
{
    public Task ExecuteAsync(JobContext context, CancellationToken cancellationToken)
    {
        context.Logger.LogInformation("Building the daily report…");
        return Task.CompletedTask;
    }
}

The [Job(...)] attribute carries optional Name, Schedule (cron), MaxRetries, TimeoutSeconds, and Tags. It is consumed by attribute-based discovery at host startup — see UKBatch.Core.

This package runs nothing on its own

UKBatch.Abstractions has no dispatcher, scheduler, or stores. To actually run a job you need the runtime in UKBatch.Core plus a host package:

  • ASP.NET Core app → reference UKBatch.AspNetCore (brings Core) and register jobs with builder.AddUKBatchAspNetCore(...).
  • Console / generic host → reference UKBatch.Core directly and register with services.AddUKBatch(...).

When to use it

Reference this package directly only from shared contract libraries — assemblies that define jobs or work with UKBatch DTOs but must stay free of the runtime and its transitive dependencies. Application and worker projects get these contracts transitively through UKBatch.Core.

License

MIT. See LICENSE in the repo root. Full docs: nspukcode-hub.github.io/UKBatch · GitHub.

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 (5)

Showing the top 5 NuGet packages that depend on UKBatch.Abstractions:

Package Downloads
UKBatch.Core

In-process runtime for UKBatch — dispatcher, scheduler, executors, in-memory stores and transport. Reference this from UKBatch.AspNetCore consumers; adapter packages reference Abstractions only.

UKBatch.Transport.RabbitMQ

RabbitMQ (AMQP) transport adapter for UKBatch — cross-service ITransport over a broker with durable/persistent messaging, publisher confirms, manual ack, dead-letter queue and request/reply (direct-reply-to). Plug-in replacement for InProcessTransport / HttpTransport when microservices need to communicate over a broker. Security at the broker layer (user/pass + TLS); no application-level HMAC.

UKBatch.Worker

Worker-mode helper for UKBatch (Server + Workers deployment). One call — builder.UseWorkerMode(...) — turns a microservice into a worker that advertises itself to the UKBatch.Server over an HTTP heartbeat (observability only) and fail-fasts at startup unless a cross-service ITransport (RabbitMQ/HTTP) is registered. Adds NOTHING to the dispatch path; the orchestrator reaches the worker over the transport. References Abstractions + Core only — never UKBatch.Api.

UKBatch.Storage.EntityFrameworkCore

EF Core 10 persistent storage adapter for UKBatch — IJobStore + IBatchDefinitionStore + durable approval gates over PostgreSQL (Npgsql) and SQLite. Plug-in replacement for the in-memory stores so batch definitions, execution history, and pending approvals survive host restarts.

UKBatch.Transport.Http

HTTP transport adapter for UKBatch — cross-service ITransport over HMAC-signed REST (POST /publish, GET /poll, POST /invoke). Plug-in replacement for InProcessTransport when microservices need to communicate.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.2-alpha 93 6/18/2026
0.2.1-alpha 89 6/15/2026
0.2.0-alpha 87 6/14/2026
0.1.6-alpha 90 6/13/2026
0.1.5-alpha 91 6/12/2026
0.1.4-alpha 92 6/10/2026
0.1.3-alpha 87 6/8/2026
0.1.1-alpha 90 6/8/2026
0.1.0-alpha 94 6/6/2026