filipbekic01/ResQueue
حول
ResQueue is a web-based UI tool for managing SQL-based message transports.
البيانات والتحليلاتالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- +١
- خلال 15 يومًا
- +٢
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلResQueue
[!TIP] Looking for a headless SQL worker? Try Pgmq.NET. Background messaging on the PostgreSQL you already run, with no broker to operate. It covers what most apps need today:
- Strongly typed publishers and consumers, with every pgmq feature supported one to one
- Background workers woken instantly by
LISTEN/NOTIFY- OpenTelemetry traces and metrics out of the box
- Shovel functionality via routines
dotnet add package Pgmq.Hosting
ResQueue (pronounced /ˈrɛskjuː/) is a web-based UI management tool designed for SQL-based message transports. Currently, it offers seamless integration with MassTransit, and we're open to adding support for additional frameworks based on user feedback and demand.
Join our community on Discord for updates, support, and discussions.
All checked features are available in latest NuGet version.
Get Started
To set up ResQueue within your application, follow these simple steps:
dotnet add package ResQueue.MassTransit
var builder = WebApplication.CreateBuilder(args);
// MassTransit configuration...
builder.Services.AddOptions<SqlTransportOptions>().Configure(options =>
{
options.ConnectionString = "your_connection_string";
});
// ResQueue uses SqlTransportOptions credentials internaly
builder.Services.AddResQueue(o => o.SqlEngine = ResQueueSqlEngine.Postgres);
// The order of migrations is very important
builder.Services.AddPostgresMigrationHostedService();
builder.Services.AddResQueueMigrationsHostedService();
var app = builder.Build();
app.UseResQueue("resqueue", options =>
{
// Highly recommended for production
options.RequireAuthorization();
});
app.Run();
[!NOTE] You can create a standalone web application and deploy it. Simply add ResQueue nuget package and initialize it. It does not need to be tightly integrated with your existing application. There is also docker image below.
Message Transformers
Transformers allow you to modify messages on the backend. They are used to generate useful data for the response, such as assembling links to your monitoring system or other relevant resources.
builder.Services.AddResQueue(opt =>
{
// Option 1: Custom transformer class
opt.AddTransformer<CustomTransformer>();
// ...see below for implementation
// Option 2: Inline message transformer
opt.AppendAdditionalData = (messageDeliveryDto) =>
{
return new()
{
{ "CurrentDateTime", DateTime.UtcNow.ToString() },
{ "Custom", "Data" },
{ "SimpleLink", @"<a href='https://www.youtube.com/watch?v=dQw4w9WgXcQ' target='_blank'>This is a link</a>" }
};
};
});
// Option 1: The custom transformer class
public class CustomTransformer(
IHttpContextAccessor httpContextAccessor
) : AbstractMessageTransformer
{
public override Task<MessageDeliveryDto> TransformAsync(MessageDeliveryDto message)
{
message.AdditionalData ??= new();
// Example using HTTP origin header
message.AdditionalData["HttpOrigin"] = httpContextAccessor.HttpContext.Request.Headers["Origin"];
return Task.FromResult(message);
}
}
Additional data will appear in next format:
Queue depth history
When enabled, ResQueue periodically samples each queue's ready, error and dead-letter counts and shows them as a "Queue Depth" chart next to the queue metrics chart. Samples are stored in a ResQueue-owned table (_resqueue_queue_depth_metric on Postgres, _ResQueue_QueueDepthMetric on SQL Server) in the transport schema. The table is created automatically, so the database user needs permission to create tables in that schema.
builder.Services.AddResQueue(opt =>
{
opt.QueueDepthHistory.Enabled = true; // default: false
opt.QueueDepthHistory.SampleInterval = TimeSpan.FromSeconds(60); // default: 60 seconds (minimum 5 seconds)
opt.QueueDepthHistory.Retention = TimeSpan.FromDays(1); // default: 1 day, older samples are deleted
});
With Docker, use environment variables such as -e ResQueue__QueueDepthHistory__Enabled=true.
Docker support
Simplify your setup by running ResQueue in standalone mode with Docker. Get up and running effortlessly without additional configurations—just pull the container and you're ready to go.
docker run -it --rm -p 8080:8080 -e ResQueue:SqlEngine=Postgres -e SqlTransport:ConnectionString="Host=host.docker.internal;Database=DATABASE;Username=USERNAME;Password=PASSWORD;" ghcr.io/filipbekic01/resqueue
UI Preview
Here's a quick preview of the ResQueue user interface, providing you with a glimpse of what to expect.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…