Class OutboxWorkerSettings
- Namespace
- Silverback.Messaging.Producing.TransactionalOutbox
- Assembly
- Silverback.Integration.dll
The OutboxWorker and OutboxWorkerService settings.
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
outboxSettingsOutboxSettingsThe outbox settings.
OutboxWorkerSettings(OutboxSettings, DistributedLockSettings?)
Initializes a new instance of the OutboxWorkerSettings class.
public OutboxWorkerSettings(OutboxSettings outboxSettings, DistributedLockSettings? lockSettings)
Parameters
outboxSettingsOutboxSettingsThe outbox settings.
lockSettingsDistributedLockSettingsThe distributed lock settings.
OutboxWorkerSettings(OutboxWorkerSettings)
protected OutboxWorkerSettings(OutboxWorkerSettings original)
Parameters
originalOutboxWorkerSettings
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
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
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
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
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
Interval
Gets the delay between the outbox processing iterations. The default is 500 milliseconds.
public TimeSpan Interval { get; init; }
Property Value
MaxRetryDelay
Gets the maximum delay to be applied.
public TimeSpan? MaxRetryDelay { get; init; }
Property Value
Outbox
Gets the outbox settings.
public OutboxSettings Outbox { get; }
Property Value
RetryDelayFactor
Gets the factor to be applied to the delay to be applied at each retry.
public double RetryDelayFactor { get; init; }
Property Value
RetryDelayIncrement
Gets the increment to the delay to be applied at each retry.
public TimeSpan RetryDelayIncrement { get; init; }
Property Value
Methods
Equals(OutboxWorkerSettings?)
public virtual bool Equals(OutboxWorkerSettings? other)
Parameters
otherOutboxWorkerSettings
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
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
leftOutboxWorkerSettingsrightOutboxWorkerSettings
Returns
operator !=(OutboxWorkerSettings?, OutboxWorkerSettings?)
public static bool operator !=(OutboxWorkerSettings? left, OutboxWorkerSettings? right)
Parameters
leftOutboxWorkerSettingsrightOutboxWorkerSettings