Skip to content

Processor Thread Options

c#
services.AddServiceBus(builder => 
{
    builder.Options.ProcessorThread = new ProcessorThreadOptions
    {
        JoinTimeout = TimeSpan.FromSeconds(15),
        IsBackground = false,
        Priority = ThreadPriority.Normal
    };
})

The default JSON settings structure is as follows:

json
{
  "Shuttle": {
    "ServiceBus": {
      "ProcessorThread": {
        "JoinTimeout": "00:00:15",
        "IsBackground": false,
        "Priority": "Lowest"  
      }
    }
  }
}

Options

OptionDefaultDescription
JoinTimeout00:00:15The duration to allow the processor thread to join the main thread.
IsBackgroundtrueIndicates whether the thread will be started as a background thread. Background threads are instantly killed when the host process stops.
PriorityThreadPriority.NormalIndicates the thread priority.