DelayQueue.Core 3.0.2

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

Delayed Message Processing: Execute tasks at specified future timestamps

Redis Backed: Utilizes Redis for reliable message storage and coordination

Automatic Retry: Failed consumer executions trigger automatic retry mechanisms

Scalable Consumers: Support for multiple consumer instances per topic

Topic-based Organization: Messages organized by topics for structured processing

Installation Add the delay queue service to your application:

services.AddDelayQueue(configuration.GetSection("DelayQueueRedis"))
    .AddProducer(configuration.GetSection("DelayQueueProducer"))
    .AddConsumer(configuration.GetSection("DelayQueueConsumer"))
    .AddCoordinator(configuration.GetSection("DelayQueueCoordinator"));

This automatically injects:

CoordinatorFactory - For managing topic coordination

ConsumerFactory - For creating message consumers

ProducerFactory - For publishing delayed messages

{
  "DelayQueueRedis": {
    // Redis settings
  },
  "DelayQueueProducer": {
    // Producer settings
  },
  "DelayQueueConsumer": {
    // Consumer settings
  },
  "DelayQueueCoordinator": {
    // Coordinator settings
  }
}

Dependency Injection

        var ProducerFactory = provider.GetRequiredService<ProducerFactory>();
        var consumerFactory = provider.GetRequiredService<ConsumerFactory>();
        var coordinatorFactory = provider.GetRequiredService<CoordinatorFactory>();

Usage Producer Publish delayed messages to a topic:

await ProducerFactory.CreateProducer("TaskTopic").PublishAsync(task.id, task.task_executiontime);

Consumer Consume messages from a topic. Return true on successful processing, false or throw exceptions to trigger retries:

for (int i = 0; i < 4; i++)
{
    await ConsumerFactory.CreateConsumer("TaskTopic").StartAsync(async (taskid, timestamp) =>
    {
        Console.WriteLine(taskid);
        // Process the message
        return true; // Return false to trigger retry
    });
}

Coordinator Each topic requires a coordinator instance:

await CoordinatorFactory.CreateCoordinator("TaskTopic").StartAsync().ConfigureAwait(false);

Error Handling Consumers returning false will trigger message retry

Exceptions thrown in consumer handlers will trigger retry

Ensure idempotent processing in consumer logic

Notes Each TaskTopic must have exactly one coordinator instance running

Multiple consumers can process messages from the same topic concurrently

Message timestamps should be in Unix timestamp format

Ensure proper error handling and logging in consumer implementations

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 was computed.  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
3.0.2 161 12/6/2025
3.0.0 211 12/4/2025
2.2.0 367 12/6/2023
2.1.2 227 11/21/2023
2.1.1 220 11/15/2023
2.1.0 609 7/27/2022
2.0.2 608 7/19/2022
2.0.1 595 7/19/2022
2.0.0 637 7/15/2022