Class OutboxWorkerSettings
The OutboxWorker and OutboxWorkerService settings.
Inherited Members
Namespace: Silverback.Messaging.Producing.TransactionalOutbox
Assembly: Silverback.Integration.dll
Syntax
public record OutboxWorkerSettings : IValidatableSettings, IEquatable<OutboxWorkerSettings>
Constructors
OutboxWorkerSettings(OutboxSettings)
Initializes a new instance of the OutboxWorkerSettings class.
Declaration
public OutboxWorkerSettings(OutboxSettings outboxSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| OutboxSettings | outboxSettings | The outbox settings. |
OutboxWorkerSettings(OutboxSettings, DistributedLockSettings?)
Initializes a new instance of the OutboxWorkerSettings class.
Declaration
public OutboxWorkerSettings(OutboxSettings outboxSettings, DistributedLockSettings? lockSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| OutboxSettings | outboxSettings | The outbox settings. |
| DistributedLockSettings | lockSettings | The distributed lock settings. |
OutboxWorkerSettings(OutboxWorkerSettings)
The OutboxWorker and OutboxWorkerService settings.
Declaration
protected OutboxWorkerSettings(OutboxWorkerSettings original)
Parameters
| Type | Name | Description |
|---|---|---|
| OutboxWorkerSettings | original |
Properties
BatchSize
Gets the number of messages to be handled and acknowledged at once. The default is 1000.
Declaration
public int BatchSize { get; init; }
Property Value
| Type | Description |
|---|---|
| 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.
Declaration
public DistributedLockSettings? DistributedLock { get; }
Property Value
| Type | Description |
|---|---|
| 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.
Declaration
public bool EnforceMessageOrder { get; init; }
Property Value
| Type | Description |
|---|---|
| bool |
EqualityContract
The OutboxWorker and OutboxWorkerService settings.
Declaration
protected virtual Type EqualityContract { get; }
Property Value
| Type | Description |
|---|---|
| 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.
Declaration
public TimeSpan InitialRetryDelay { get; init; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
Interval
Gets the delay between the outbox processing iterations. The default is 500 milliseconds.
Declaration
public TimeSpan Interval { get; init; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
MaxRetryDelay
Gets the maximum delay to be applied.
Declaration
public TimeSpan? MaxRetryDelay { get; init; }
Property Value
| Type | Description |
|---|---|
| TimeSpan? |
Outbox
Gets the outbox settings.
Declaration
public OutboxSettings Outbox { get; }
Property Value
| Type | Description |
|---|---|
| OutboxSettings |
RetryDelayFactor
Gets the factor to be applied to the delay to be applied at each retry.
Declaration
public double RetryDelayFactor { get; init; }
Property Value
| Type | Description |
|---|---|
| double |
RetryDelayIncrement
Gets the increment to the delay to be applied at each retry.
Declaration
public TimeSpan RetryDelayIncrement { get; init; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
Methods
Equals(OutboxWorkerSettings?)
The OutboxWorker and OutboxWorkerService settings.
Declaration
public virtual bool Equals(OutboxWorkerSettings? other)
Parameters
| Type | Name | Description |
|---|---|---|
| OutboxWorkerSettings | other |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object?)
The OutboxWorker and OutboxWorkerService settings.
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
GetHashCode()
The OutboxWorker and OutboxWorkerService settings.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
PrintMembers(StringBuilder)
The OutboxWorker and OutboxWorkerService settings.
Declaration
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| StringBuilder | builder |
Returns
| Type | Description |
|---|---|
| bool |
ToString()
The OutboxWorker and OutboxWorkerService settings.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
Validate()
Throws a SilverbackConfigurationException if the configuration is not valid.
Declaration
public void Validate()
Operators
operator ==(OutboxWorkerSettings?, OutboxWorkerSettings?)
The OutboxWorker and OutboxWorkerService settings.
Declaration
public static bool operator ==(OutboxWorkerSettings? left, OutboxWorkerSettings? right)
Parameters
| Type | Name | Description |
|---|---|---|
| OutboxWorkerSettings | left | |
| OutboxWorkerSettings | right |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(OutboxWorkerSettings?, OutboxWorkerSettings?)
The OutboxWorker and OutboxWorkerService settings.
Declaration
public static bool operator !=(OutboxWorkerSettings? left, OutboxWorkerSettings? right)
Parameters
| Type | Name | Description |
|---|---|---|
| OutboxWorkerSettings | left | |
| OutboxWorkerSettings | right |
Returns
| Type | Description |
|---|---|
| bool |