Naravel.Events.Queue
0.2.0
dotnet add package Naravel.Events.Queue --version 0.2.0
NuGet\Install-Package Naravel.Events.Queue -Version 0.2.0
<PackageReference Include="Naravel.Events.Queue" Version="0.2.0" />
<PackageVersion Include="Naravel.Events.Queue" Version="0.2.0" />
<PackageReference Include="Naravel.Events.Queue" />
paket add Naravel.Events.Queue --version 0.2.0
#r "nuget: Naravel.Events.Queue, 0.2.0"
#:package Naravel.Events.Queue@0.2.0
#addin nuget:?package=Naravel.Events.Queue&version=0.2.0
#tool nuget:?package=Naravel.Events.Queue&version=0.2.0
Naravel.Events.Queue
Optional Naravel.Events adapter for running selected event listeners through Naravel.Queue.
| Fact | Detail |
|---|---|
| Install | dotnet add package Naravel.Events.Queue |
| Targets | .NET 10 |
| Needs | Naravel.Events and Naravel.Queue, which NuGet installs with it |
| Runs on | a Naravel.Queue driver and a worker that you register |
What you get
- Opt in per listener.
AddQueuedEventListener<OrderPaid, SendReceipt>(...)moves just that listener to a queue worker. - A stable alias, not a type name. The worker finds the listener by the alias you register, and no CLR type is read from queued data.
- Placement per listener.
o => o.OnConnection("redis").OnQueue("mail").WithMaxAttempts(5)picks the connection, the queue and the attempts. - Trimming and Native AOT. Pass source-generated JSON metadata, such as
MyJsonContext.Default.OrderPaid, instead of reflection-based serialization.
Quick start
builder.Services.AddNaravelEventsQueue();
builder.Services.AddQueuedEventListener<OrderPaid, SendReceipt>("order-paid.receipt");
The listener runs later on a queue worker, at least once, so make it idempotent. By default the job goes to the default queue connection and the default queue, so run a worker that consumes them.
Related packages
| Package | Adds |
|---|---|
Naravel.Events |
The event dispatcher whose listeners this adapter can queue |
Naravel.Queue |
Jobs, retries and the background worker that run the queued listener |
Learn more
- Events: English guide
- Queue: English guide
- Changelog · Source and issues · MIT license
Part of Naravel: Laravel's names, .NET's type system. All Naravel packages share one version.
| Product | Versions 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. |
-
net10.0
- Naravel.Events (>= 0.2.0)
- Naravel.Queue (>= 0.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Release notes: https://github.com/km-arc/Naravel/releases/tag/v0.2.0 - full history: https://github.com/km-arc/Naravel/blob/main/CHANGELOG.md