Skip to content

TickerQ

Installation

You can install it with:

cli
> dotnet add package TickerQ
pm
PM> NuGet\Install-Package TickerQ
pm
<PackageReference Include="TickerQ" Version="*" />

Configure Services

Register TickerQ in IServiceCollection

csharp
using TickerQ.DependencyInjection;
using TickerQ.EntityFrameworkCore.DependencyInjection;
....

services.AddTickerQ(opt =>
{
  // Set your class that implements ITickerExceptionHandler.  
  opt.SetExceptionHandler<MyExceptionHandlerClass>();
  // Set the max thread concurrency for Ticker (default: Environment.ProcessorCount).
  opt.SetMaxConcurrency(maxConcurrency: ...);
});

// Required only if you're targeting .NET Core 3.1 or earlier (.NET 5+ handles this via source generators)
TickerQInstanceFactory.Initialize();

Configure Middleware

Use TickerQ using IApplicationBuilder

csharp
using TickerQ.DependencyInjection;
....

// (default: TickerQStartMode.Immediate)
app.UseTickerQ(startMode: ...);