Hangfire is running inside a .Net 8 Web Api application. We have multiple BackgroundJobServer running. The storage is configured as such:
.UseSqlServerStorage(bbConnectionString, new SqlServerStorageOptions
{
// Default recommended settings for Hangfire 1.7+
SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5),
QueuePollInterval = TimeSpan.Zero,
UseRecommendedIsolationLevel = true,
DisableGlobalLocks = true,
})
Each BackgroundJobServer is servicing its own distinct queues. Is there a way to set a custom poll interval for each server? For some queues, a polling interval of 5 minutes would be acceptable, while for others the default polling setup with UseSqlServerStorage is what’s desired.
Or are there any other mechanisms to achieve the same result? Having multiple servers, each polling continually the database, overloads the DB too much.