Naravel.Queue.File
0.2.0
dotnet add package Naravel.Queue.File --version 0.2.0
NuGet\Install-Package Naravel.Queue.File -Version 0.2.0
<PackageReference Include="Naravel.Queue.File" Version="0.2.0" />
<PackageVersion Include="Naravel.Queue.File" Version="0.2.0" />
<PackageReference Include="Naravel.Queue.File" />
paket add Naravel.Queue.File --version 0.2.0
#r "nuget: Naravel.Queue.File, 0.2.0"
#:package Naravel.Queue.File@0.2.0
#addin nuget:?package=Naravel.Queue.File&version=0.2.0
#tool nuget:?package=Naravel.Queue.File&version=0.2.0
Naravel.Queue.File
File-based queue driver for Naravel.Queue - durable, zero external services required, JSON files on disk.
| Fact | Detail |
|---|---|
| Install | dotnet add package Naravel.Queue.File |
| Targets | .NET 10 |
| Needs | Naravel.Queue, which NuGet installs with it |
| Driver | file, added with AddFileDriver |
What you get
- Durable with no service to run. Jobs are JSON files that survive a restart and can be inspected by opening the folder; a good fit for one machine or a small app.
- One folder per state. Each queue has
pending,reservedandfaileddirectories under thePath. - Two workers cannot take one job. A reservation moves the file from
pendingtoreserved, which is effectively atomic on a single volume. - Priorities and delays. File names sort higher priority first, and a job that is not due yet is skipped.
- Fenced reservations. A worker that outlives its visibility timeout cannot acknowledge the copy that another worker now owns; the job simply runs a second time.
Quick start
{
"NaravelQueue": {
"Default": "disk",
"Stores": {
"disk": { "Driver": "file", "Path": "storage/queue", "VisibilityTimeoutSeconds": "300" }
}
}
}
using Naravel.Queue.Extensions;
using Naravel.Queue.File;
builder.Services.AddQueue(builder.Configuration).AddFileDriver(builder.Configuration);
builder.Services.AddQueueWorker();
Path is the directory that holds the store's JSON files; it defaults to storage/netqueue/<store name>. VisibilityTimeoutSeconds (default 300) is how long a job may stay reserved by a worker that has disappeared before it goes back to the queue, so set it above your longest job. Failed jobs are kept in memory unless you register a persistent failed-job store.
Related packages
| Package | Adds |
|---|---|
Naravel.Queue |
Jobs, retries with backoff, chaining, batching and the background worker |
Learn more
- 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.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