Show / Hide Table of Contents

    Class OutboxWorkerService

    The IHostedService that triggers the IOutboxWorker at regular intervals.

    Inheritance
    object
    BackgroundService
    DistributedBackgroundService
    RecurringDistributedBackgroundService
    OutboxWorkerService
    Implements
    IHostedService
    IDisposable
    Inherited Members
    RecurringDistributedBackgroundService.Pause()
    RecurringDistributedBackgroundService.Resume()
    RecurringDistributedBackgroundService.AcquireLockAndExecuteAsync(CancellationToken)
    DistributedBackgroundService.ExecuteAsync(CancellationToken)
    DistributedBackgroundService.DistributedLock
    BackgroundService.StartAsync(CancellationToken)
    BackgroundService.StopAsync(CancellationToken)
    BackgroundService.Dispose()
    BackgroundService.ExecuteTask
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Silverback.Messaging.Producing.TransactionalOutbox
    Assembly: Silverback.Integration.dll
    Syntax
    public class OutboxWorkerService : RecurringDistributedBackgroundService, IHostedService, IDisposable

    Constructors

    OutboxWorkerService(OutboxWorkerSettings, IOutboxWorker, IDistributedLock, ISilverbackLogger<OutboxWorkerService>)

    Initializes a new instance of the OutboxWorkerService class.

    Declaration
    public OutboxWorkerService(OutboxWorkerSettings settings, IOutboxWorker outboxWorker, IDistributedLock distributedLock, ISilverbackLogger<OutboxWorkerService> logger)
    Parameters
    Type Name Description
    OutboxWorkerSettings settings

    The OutboxWorkerSettings.

    IOutboxWorker outboxWorker

    The IOutboxWorker implementation.

    IDistributedLock distributedLock

    The IDistributedLock.

    ISilverbackLogger<OutboxWorkerService> logger

    The ISilverbackLogger.

    Properties

    OutboxWorker

    Gets the associated IOutboxWorker.

    Declaration
    public IOutboxWorker OutboxWorker { get; }
    Property Value
    Type Description
    IOutboxWorker

    Methods

    ExecuteLockedAsync(CancellationToken)

    Calls the IOutboxWorker to process the queue.

    Declaration
    protected override Task ExecuteLockedAsync(CancellationToken stoppingToken)
    Parameters
    Type Name Description
    CancellationToken stoppingToken

    A CancellationToken to observe while waiting for the task to complete.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Overrides
    DistributedBackgroundService.ExecuteLockedAsync(CancellationToken)

    Implements

    IHostedService
    IDisposable
    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini