Class ServiceBusWorkflowWorkerService
- Namespace
- JD.AI.Workflows.Distributed.AzureServiceBus
- Assembly
- JD.AI.Workflows.Distributed.dll
Azure Service Bus processor worker that delegates to IWorkflowWorker.
public sealed class ServiceBusWorkflowWorkerService : BackgroundService, IHostedService, IDisposable
- Inheritance
-
ServiceBusWorkflowWorkerService
- Implements
- Inherited Members
Constructors
ServiceBusWorkflowWorkerService(ServiceBusClient, IWorkflowWorker, IDeadLetterSink, ServiceBusWorkflowOptions, ILogger<ServiceBusWorkflowWorkerService>)
Initializes the worker service.
public ServiceBusWorkflowWorkerService(ServiceBusClient client, IWorkflowWorker worker, IDeadLetterSink dlq, ServiceBusWorkflowOptions options, ILogger<ServiceBusWorkflowWorkerService> logger)
Parameters
clientServiceBusClientworkerIWorkflowWorkerdlqIDeadLetterSinkoptionsServiceBusWorkflowOptionsloggerILogger<ServiceBusWorkflowWorkerService>
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()
ExecuteAsync(CancellationToken)
This method is called when the IHostedService starts. The implementation should return a task that represents the lifetime of the long running operation(s) being performed.
protected override Task ExecuteAsync(CancellationToken stoppingToken)
Parameters
stoppingTokenCancellationTokenTriggered when StopAsync(CancellationToken) is called.
Returns
Remarks
See Worker Services in .NET for implementation guidelines.