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" />
                    
Directory.Packages.props
<PackageReference Include="FireTransit" />
                    
Project file
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
                    
#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
                    
Install FireTransit as a Cake Addin
#tool nuget:?package=FireTransit&version=1.0.2
                    
Install FireTransit as a Cake Tool

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 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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 149 4 days ago
1.0.1 106 5 days ago
1.0.0 127 6 days ago