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 :)
To install Hangfire MongoDB Storage, run the following command in the Nuget Package Manager Console:
PM> Install-Package HangFire.Mongo
app.UseHangfire(config =>
{
config.UseMongoStorage("<connection string>", "<database name>");
});
For example:
app.UseHangfire(config =>
{
config.UseMongoStorage("mongodb://localhost", "ApplicationDatabase");
});
To use custom prefix for collections names specify it on Hangfire setup:
app.UseHangfire(config =>
{
config.UseMongoStorage("mongodb://localhost", "ApplicationDatabase",
new MongoStorageOptions { Prefix = "custom" } );
});
Hangfire.Mongo is released under the MIT License.