Simple Organized Code

Simple commands and handlers allow for clean organized code.


Commands define job arguments, and is the object that is published or scheduled. Commands should be small JSON serializable classes.

public class DoWorkCommand : IQuidjiboCommand
    public int Id { get; }
    public string Text { get; }
    public DoWorkCommand(int id, string text)
        Id = id;
        Text = text;


Handlers are where you compose the actual handling of the queued job. If you use DI framework integration, you can provide constructor-injected dependencies. Otherwise, leave the constructor empty.

public class DoWorkHandler : IQuidjiboHandler<DoWorkCommand>
    private readonly IExampleService _service;

    public DoWorkHandler()
        // provide concrete dependencies when not using DI framework
        _service = new ExampleService();

    public DoWorkHandler(IExampleService service)
        // constructor injection using DI framework
        _service = service;

    public async Task ProcessAsync(
        DoWorkCommand command, 
        IQuidjiboProgress progress, 
        CancellationToken cancellationToken)
        progress.Report(1, $"Starting work for {command.Id}");

        // do work...
        await Task.Delay(25, cancellationToken);

        progress.Report(100, $"Finished work for {command.Id}");


The builder lets you chain together your configuration. The BuildClient(), and BuildServer() methods stand up your infrastructure. Other integrations let you embed Quidjibo into your AspNet, AspNetCore, and other types of projects.

var quidjiboBuilder = new QuidjiboBuilder()
    .ConfigurePipeline(pipeline => pipeline.UseDefault());

var client = quidjiboBuilder.BuildClient();
using (var workServer = quidjiboBuilder.BuildServer())
        // keep alive in the background