Skip to content

Dashboard

Brian Lehnen edited this page Apr 9, 2026 · 7 revisions

Dashboard API

The Dashboard API is a REST service for monitoring and managing queues across all transports. Built on ASP.NET Core with Swagger/OpenAPI docs included.

Features
  • Monitor message counts by status (Waiting, Processing, Error, Processed)
  • Inspect message bodies, headers, and configuration
  • Detect stale messages via heartbeat tracking
  • Manage error messages (view, requeue, delete)
  • Edit message bodies, reset stale messages, delete messages
  • Query scheduled jobs
  • Track active consumers per queue
  • Host queue maintenance monitors centrally
  • View message history and lifecycle events
  • Purge old history records by retention age
  • Cancel running messages (cooperative, in-process only)
  • Supports all transports: SQL Server, PostgreSQL, SQLite, LiteDb, Redis, Memory
Installation

Install the Dashboard API NuGet package:

Install-Package DotNetWorkQueue.Dashboard.Api

You will also need the transport package(s) for the queues you want to monitor (e.g., DotNetWorkQueue.Transport.SqlServer).

Setup

Register the dashboard in your ASP.NET Core application:

using DotNetWorkQueue.Dashboard.Api;
using DotNetWorkQueue.Transport.SqlServer.Basic;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddDotNetWorkQueueDashboard(options =>
{
    options.EnableSwagger = true;

    options.AddConnection<SqlServerMessageQueueInit>(
        "Server=myserver;Database=mydb;Trusted_Connection=true;",
        conn =>
        {
            conn.DisplayName = "Production SQL Server";
            conn.AddQueue("OrderQueue");
            conn.AddQueue("NotificationQueue");
        });
});

var app = builder.Build();
app.UseDotNetWorkQueueDashboard();
app.MapControllers();
app.Run();

Multiple connections and transports can be registered in a single dashboard instance:

builder.Services.AddDotNetWorkQueueDashboard(options =>
{
    options.AddConnection<SqlServerMessageQueueInit>(sqlConnString, conn =>
    {
        conn.DisplayName = "SQL Server";
        conn.AddQueue("OrderQueue");
    });

    options.AddConnection<RedisQueueInit>(redisConnString, conn =>
    {
        conn.DisplayName = "Redis";
        conn.AddQueue("CacheQueue");
    });
});
Configuration-based setup

Connections can also be driven from appsettings.json. See the sample project for a full example using configuration binding.

{
  "Dashboard": {
    "EnableSwagger": true,
    "Connections": [
      {
        "Transport": "SqlServer",
        "ConnectionString": "Server=myserver;Database=mydb;Trusted_Connection=true;",
        "DisplayName": "Production DB",
        "Queues": [ "OrderQueue", "NotificationQueue" ]
      }
    ]
  }
}
Swagger

Swagger UI is enabled by default. Once the application is running, navigate to /swagger to explore and test the API endpoints.

See also

Clone this wiki locally