FireTransit 1.0.2
dotnet add package FireTransit --version 1.0.2
NuGet\Install-Package FireTransit -Version 1.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="FireTransit" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FireTransit" Version="1.0.2" />
<PackageReference Include="FireTransit" />
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 FireTransit --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FireTransit, 1.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.
#addin nuget:?package=FireTransit&version=1.0.2
#tool nuget:?package=FireTransit&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
FireTransit
FireTransit is a scalable background job processing library that bridges Hangfire, MassTransit, and RabbitMQ to enable distributed job execution in .NET applications.
Features
- Scalability – Distribute job processing across multiple worker nodes.
- Decoupling – Services communicate via messages, reducing direct dependencies.
- Fault Tolerance – RabbitMQ ensures reliable job distribution.
- Easy Integration – Seamlessly connects Hangfire and MassTransit.
- Multi-Database Support – Works with PostgreSQL, SQL Server, and MySQL.
Installation
Add FireTransit to your .NET project:
dotnet add package FireTransit
Quick Start
1. Configure FireTransit in Program.cs
var builder = Host.CreateApplicationBuilder(args);
// Add FireTransit
builder.Services.UseFireTransit(builder.Configuration);
var host = builder.Build();
host.Run();
2. Consume a Job
public class SendEmailConsumer : IConsumer<SendEmailMessage>
{
public async Task Consume(ConsumeContext<SendEmailMessage> context)
{
Console.WriteLine($"Sending email to {context.Message.Email}");
}
}
public class SendEmailMessage : IBaseMessage
{
public string Name => "Sample Email Message";
public string Description => "Triggers sending email messages.";
public int Email { get; set; }
}
3. Schedule a recurring job
var eventPublisher = provider.GetRequiredService<IEventPublisher>();
eventPublisher.Recurring<SendEmailMessage>(new SendEmailMessage {
Email = "user@example.com"
}, Cron.Minutely());
Use Cases
- Email Notifications – Process email-sending jobs asynchronously without blocking the main application.
- Order Processing – Handle background processing of customer orders, reducing API response times.
- Data Importing – Queue large data imports without overloading your API.
- Scheduled Reports – Generate and distribute reports on a schedule.
- Event-Driven Workflows – Trigger automated background tasks based on user actions or system events.
Scaling Up
- Deploy multiple workers to process jobs in parallel.
- Monitor job execution using Hangfire Dashboard.
- Keep services independent for better maintainability.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Hangfire.AspNetCore (>= 1.8.18)
- Hangfire.MySqlStorage (>= 2.0.3)
- Hangfire.PostgreSql (>= 1.20.10)
- Hangfire.SqlServer (>= 1.8.18)
- MassTransit (>= 8.4.0)
- MassTransit.Hangfire (>= 8.4.0)
- MassTransit.RabbitMQ (>= 8.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.