/Hangfire.Mongo

Mongo DB support for Hangfire

Primary LanguageC#MIT LicenseMIT

Hangfire.Mongo

Build status

MongoDB support for Hangfire library. By using this library you can store all jobs information in MongoDB.

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

Installation

To install Hangfire MongoDB Storage, run the following command in the Nuget Package Manager Console:

PM> Install-Package HangFire.Mongo

Usage

app.UseHangfire(config =>
{
	config.UseMongoStorage("<connection string>", "<database name>");
});

For example:

app.UseHangfire(config =>
{
	config.UseMongoStorage("mongodb://localhost", "ApplicationDatabase");
});

Custom collections prefix

To use custom prefix for collections names specify it on Hangfire setup:

app.UseHangfire(config =>
{
	config.UseMongoStorage("mongodb://localhost", "ApplicationDatabase",
  	  	new MongoStorageOptions { Prefix = "custom" } );
});

License

Hangfire.Mongo is released under the MIT License.