Repository navigation
QueueDelayConfiguration
blehnen edited this page Nov 10, 2026
·
4 revisions
For transports that require polling, you may not want to query them constantly when there is no work to process. You can configure this with the queue delay settings.
A collection of time spans on the transport configuration controls this behavior. When the worker finds no record to process, it increments a count and then pauses for the length of time that the time span gives. When a record is found, the delay index is reset to 0.
The configuration has default delays, but you can change them.
queue.Configuration.TransportConfiguration.QueueDelayBehavior.Clear();
var list = new List<TimeSpan>
{
TimeSpan.FromMilliseconds(500),
TimeSpan.FromMilliseconds(500),
TimeSpan.FromMilliseconds(500),
TimeSpan.FromMilliseconds(500),
TimeSpan.FromMilliseconds(1000),
TimeSpan.FromMilliseconds(2000)
};
queue.Configuration.TransportConfiguration.QueueDelayBehavior.Add(list);For any issues please use the GitHub issues