Table of Contents

Class OutboxWorkerSettings

Namespace
Silverback.Messaging.Producing.TransactionalOutbox
Assembly
Silverback.Integration.dll
public record OutboxWorkerSettings : IValidatableSettings, IEquatable<OutboxWorkerSettings>
Inheritance
OutboxWorkerSettings
Implements
Inherited Members

Constructors

OutboxWorkerSettings(OutboxSettings)

Initializes a new instance of the OutboxWorkerSettings class.

public OutboxWorkerSettings(OutboxSettings outboxSettings)

Parameters

outboxSettings OutboxSettings

The outbox settings.

OutboxWorkerSettings(OutboxSettings, DistributedLockSettings?)

Initializes a new instance of the OutboxWorkerSettings class.

public OutboxWorkerSettings(OutboxSettings outboxSettings, DistributedLockSettings? lockSettings)

Parameters

outboxSettings OutboxSettings

The outbox settings.

lockSettings DistributedLockSettings

The distributed lock settings.

OutboxWorkerSettings(OutboxWorkerSettings)

protected OutboxWorkerSettings(OutboxWorkerSettings original)

Parameters

original OutboxWorkerSettings

Properties

BatchSize

Gets the number of messages to be handled and acknowledged at once. The default is 1000.

public int BatchSize { get; init; }

Property Value

int

DistributedLock

Gets the settings for the optional IDistributedLock to be used to ensure that only one instance is running at the same time. By default, it will be automatically inferred from the Outbox settings.

public DistributedLockSettings? DistributedLock { get; }

Property Value

DistributedLockSettings

EnforceMessageOrder

Gets a value indicating whether the message order should be preserved, meaning that a failure in the produce of a message will block the whole outbox. The default is true.

public bool EnforceMessageOrder { get; init; }

Property Value

bool

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

InitialRetryDelay

Gets the delay to be applied to the first retry in case of an error. If the specified delay (after taking increment and factor into account) is less than the Interval, the Interval will be used.

public TimeSpan InitialRetryDelay { get; init; }

Property Value

TimeSpan

Interval

Gets the delay between the outbox processing iterations. The default is 500 milliseconds.

public TimeSpan Interval { get; init; }

Property Value

TimeSpan

MaxRetryDelay

Gets the maximum delay to be applied.

public TimeSpan? MaxRetryDelay { get; init; }

Property Value

TimeSpan?

Outbox

Gets the outbox settings.

public OutboxSettings Outbox { get; }

Property Value

OutboxSettings

RetryDelayFactor

Gets the factor to be applied to the delay to be applied at each retry.

public double RetryDelayFactor { get; init; }

Property Value

double

RetryDelayIncrement

Gets the increment to the delay to be applied at each retry.

public TimeSpan RetryDelayIncrement { get; init; }

Property Value

TimeSpan

Methods

Equals(OutboxWorkerSettings?)

public virtual bool Equals(OutboxWorkerSettings? other)

Parameters

other OutboxWorkerSettings

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Validate()

Throws a SilverbackConfigurationException if the configuration is not valid.

public void Validate()

Operators

operator ==(OutboxWorkerSettings?, OutboxWorkerSettings?)

public static bool operator ==(OutboxWorkerSettings? left, OutboxWorkerSettings? right)

Parameters

left OutboxWorkerSettings
right OutboxWorkerSettings

Returns

bool

operator !=(OutboxWorkerSettings?, OutboxWorkerSettings?)

public static bool operator !=(OutboxWorkerSettings? left, OutboxWorkerSettings? right)

Parameters

left OutboxWorkerSettings
right OutboxWorkerSettings

Returns

bool