Class BrokerOptionsBuilderAddOutboxWorkerExtensions
Adds the AddOutboxWorker
and related methods to the IBrokerOptionsBuilder.
Inherited Members
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: Silverback.Integration.dll
Syntax
public static class BrokerOptionsBuilderAddOutboxWorkerExtensions
Methods
| Improve this doc View sourceAddOutboxWorker(IBrokerOptionsBuilder, TimeSpan?, bool, int, DistributedLockSettings?)
Adds an OutboxWorker to publish the messages stored in the outbox to the configured broker.
Declaration
public static IBrokerOptionsBuilder AddOutboxWorker(this IBrokerOptionsBuilder brokerOptionsBuilder, TimeSpan? interval = null, bool enforceMessageOrder = true, int batchSize = 1000, DistributedLockSettings? distributedLockSettings = null)
Parameters
Type | Name | Description |
---|---|---|
IBrokerOptionsBuilder | brokerOptionsBuilder | The IBrokerOptionsBuilder that references the IServiceCollection to add the services to. |
TimeSpan? | interval | The interval between each run. The default is 500ms. |
bool | enforceMessageOrder | If set to |
int | batchSize | The number of messages to be loaded and processed at once. |
DistributedLockSettings | distributedLockSettings | The settings for the locking mechanism. The default settings will be used if not specified. |
Returns
Type | Description |
---|---|
IBrokerOptionsBuilder | The IBrokerOptionsBuilder so that additional calls can be chained. |