There isn't any solution to use in production environment but a nuget
package exists that help you to use HangFire
, it can be useful for testing purpose like check the behavior and use it in a development environment.
- It should not be used in production (no integrity and no thread safe
even if many cases are managed).
- Data are stored in memory using a dictionary in a static way (See
Data created at the storage creation)
Source: Hangfire.MemoryStorage
nuget
package : Hangfire.MemoryStorage
GlobalConfiguration.Configuration.UseMemoryStorage();
Above package can't cover in-memory jobs in production environment, but below library provided conditions that can be used in production mode:
Hangfire.InMemory
This is an attempt to create an efficient transactional in-memory storage for Hangfire
with data structures close to their optimal representation. The result of this attempt should enable production-ready usage of this storage implementation and handle particular properties of in-memory processing like avoiding OutOfMemoryException
at any cost and moderate load on garbage collection. Of course we can't avoid them entirely, but at least can control them somehow.