Skip to content

ServiceBus Queue support for SQL Server job storage implementation

License

Notifications You must be signed in to change notification settings

barclayadam/Hangfire.Azure.ServiceBusQueue

 
 

Repository files navigation

HangFire.Azure.ServiceBusQueue

This library adds support for Service Bus Queues to be used together with HangFire.SqlServer job storage implementation. All job data is saved to SQL Azure database, but job queues use Service Bus Queue.

Note: This is pre-alpha version, that has not been ever tested. Please, use it with care :)

Installation

This library is available as a NuGet Package, so type the following command into your Package Manager Console window:

PM> Install-Package HangFire.Azure.ServiceBusQueue

Usage

string connectionString = 
    CloudConfigurationManager.GetSetting("Microsoft.ServiceBus.ConnectionString");

// You can configure queues through this action
Action<QueueDescription> configureAction = qd =>
{
    qd.MaxSizeInMegabytes = 5120;
    qd.DefaultMessageTimeToLive = new TimeSpan(0, 1, 0);
};

JobStorage.Current = new SqlServerStorage("<connection string>")
    // Use the "default" queue with default options...
    .UseServiceBusQueues(connectionString) // "default" queue and default options
    // ... or specify either queues...
    .UseServiceBusQueues(connectionString, "critical", "default")
    // ... or queues with configuration action
    .UseServiceBusQueues(connectionString, configureAction, "critical", "default");

License

HangFire.Azure.ServiceBusQueues is released under the MIT License.

About

ServiceBus Queue support for SQL Server job storage implementation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%