Class ServiceBusWorkflowDispatcher
- Namespace
- JD.AI.Workflows.Distributed.AzureServiceBus
- Assembly
- JD.AI.Workflows.Distributed.dll
Dispatches WorkflowWorkItem instances to Azure Service Bus.
public sealed class ServiceBusWorkflowDispatcher : IWorkflowDispatcher, IAsyncDisposable
- Inheritance
-
ServiceBusWorkflowDispatcher
- Implements
- Inherited Members
Constructors
ServiceBusWorkflowDispatcher(ServiceBusClient, ServiceBusWorkflowOptions)
Initializes the dispatcher.
public ServiceBusWorkflowDispatcher(ServiceBusClient client, ServiceBusWorkflowOptions options)
Parameters
clientServiceBusClientoptionsServiceBusWorkflowOptions
Methods
DispatchAsync(WorkflowWorkItem, CancellationToken)
Dispatches a workflow work item for execution.
public Task DispatchAsync(WorkflowWorkItem item, CancellationToken ct = default)
Parameters
itemWorkflowWorkItemThe work item to dispatch.
ctCancellationTokenCancellation token.
Returns
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
public ValueTask DisposeAsync()
Returns
- ValueTask
A task that represents the asynchronous dispose operation.