Naravel.Notifications.Queue 0.2.0

dotnet add package Naravel.Notifications.Queue --version 0.2.0
                    
NuGet\Install-Package Naravel.Notifications.Queue -Version 0.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="Naravel.Notifications.Queue" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Naravel.Notifications.Queue" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Naravel.Notifications.Queue" />
                    
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 Naravel.Notifications.Queue --version 0.2.0
                    
#r "nuget: Naravel.Notifications.Queue, 0.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 Naravel.Notifications.Queue@0.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=Naravel.Notifications.Queue&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Naravel.Notifications.Queue&version=0.2.0
                    
Install as a Cake Tool

Naravel.Notifications.Queue

NuGet Downloads .NET 10 License: MIT

Optional Naravel.Notifications adapter that delivers notifications through Naravel.Queue: only a registered alias and a plain payload are stored.

Fact Detail
Install dotnet add package Naravel.Notifications.Queue
Targets .NET 10
Needs Naravel.Notifications and Naravel.Queue, which NuGet installs with it
Runs on a Naravel.Queue driver and a worker that you register

What you get

  • An alias and a payload, nothing else. The queue stores the alias and the payload as JSON: no type name, no notification object, no recipient.
  • Fresh data in the worker. The handler gets the deserialized payload and the job's service scope, so it loads the recipient from your own services and builds the notification itself.
  • Mistakes fail early. Queueing an unregistered alias, or a payload of another type than the registered one, throws at once, and registering one alias twice is refused.
  • Placement in one place. AddNaravelNotificationQueue(options => ...) sets Connection and Queue; both default to the queue module's defaults.

Quick start

builder.Services.AddNaravelNotificationQueue();   // plus AddQueue, a queue driver and, in worker processes, AddQueueWorker
builder.Services.AddQueuedNotification<InvoicePayload>("invoice.ready", async (payload, scope, ct) =>
{
    var user = await scope.GetRequiredService<IUserRepository>().FindAsync(payload.UserId, ct);   // fresh data
    await scope.GetRequiredService<INotificationSender>().SendAsync(user, new InvoiceReady(payload.InvoiceId), ["mail"], ct);
});

await notificationQueue.QueueAsync("invoice.ready", new InvoicePayload(user.Id, 7), ct);   // INotificationQueue

InvoicePayload, InvoiceReady, IUserRepository and user are your own types and objects, and notificationQueue is an injected INotificationQueue. Never rename an alias while jobs that use it are queued.

Package Adds
Naravel.Notifications One typed notification to a recipient through the channels you name
Naravel.Queue Jobs, retries and the background worker that run the handler

Learn more

Part of Naravel: Laravel's names, .NET's type system. All Naravel packages share one version.

Product Compatible and additional computed target framework versions.
.NET 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.0 95 11/13/2026
0.1.1 103 11/2/2026
0.1.0 111 11/1/2026