Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hangfireio/hangfire.azure.queuestorage

Azure Queue Storage support for SQL Server job storage implementation
https://github.com/hangfireio/hangfire.azure.queuestorage

Last synced: 2 months ago
JSON representation

Azure Queue Storage support for SQL Server job storage implementation

Awesome Lists containing this project

README

        

HangFire.Azure.QueueStorage
============================

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

**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.QueueStorage
```

Usage
------

```csharp

CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting("StorageConnectionString"));

CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();

// Here are the default options
var options = new QueueStorageOptions
{
VisibilityTimeout = TimeSpan.FromMinutes(30),
QueuePollInterval = TimeSpan.FromSeconds(5)
};

JobStorage.Current = new SqlServerStorage("")
// Use the "default" queue with default options...
.UseAzureQueues(queueClient) // "default" queue and default options
// ... or specify either queues...
.UseAzureQueues(queueClient, "critical", "default")
// ... or queues with options
.UseAzureQueues(queueClient, options, "critical", "default");
```

License
--------

HangFire.Azure.QueueStorage is released under the [MIT License](http://www.opensource.org/licenses/MIT).