Interface IErrorPolicyChainBuilder
- Namespace
- Silverback.Messaging.Configuration
- Assembly
- Silverback.Integration.dll
Builds the IErrorPolicy.
public interface IErrorPolicyChainBuilder
Methods
Build()
Builds the IErrorPolicy instance.
IErrorPolicy Build()
Returns
ThenMoveTo(string, Action<MoveMessageErrorPolicyBuilder>?)
Adds a MoveMessageErrorPolicy that moves the messages that fail to be processed to the configured endpoint.
IErrorPolicyChainBuilder ThenMoveTo(string endpointName, Action<MoveMessageErrorPolicyBuilder>? policyBuilderAction = null)
Parameters
endpointNamestringThe endpoint name. It could be either the topic/queue name or the friendly name of an endpoint that is already configured with a producer.
policyBuilderActionAction<MoveMessageErrorPolicyBuilder>An Action<T> that takes the MoveMessageErrorPolicyBuilder and configures it.
Returns
- IErrorPolicyChainBuilder
The IErrorPolicyChainBuilder so that additional calls can be chained.
ThenRetry(Action<RetryErrorPolicyBuilder>?)
Adds a RetryErrorPolicy that retries to process the messages that previously failed to be to processed.
IErrorPolicyChainBuilder ThenRetry(Action<RetryErrorPolicyBuilder>? policyBuilderAction = null)
Parameters
policyBuilderActionAction<RetryErrorPolicyBuilder>An Action<T> that takes the RetryErrorPolicyBuilder and configures it.
Returns
- IErrorPolicyChainBuilder
The IErrorPolicyChainBuilder so that additional calls can be chained.
ThenRetry(int, Action<RetryErrorPolicyBuilder>?)
Adds a RetryErrorPolicy that retries to process the messages that previously failed to be to processed.
IErrorPolicyChainBuilder ThenRetry(int retriesCount, Action<RetryErrorPolicyBuilder>? policyBuilderAction = null)
Parameters
retriesCountintThe maximum number of retries to be performed.
policyBuilderActionAction<RetryErrorPolicyBuilder>An Action<T> that takes the RetryErrorPolicyBuilder and configures it.
Returns
- IErrorPolicyChainBuilder
The IErrorPolicyChainBuilder so that additional calls can be chained.
ThenSkip(Action<SkipMessageErrorPolicyBuilder>?)
Adds a SkipMessageErrorPolicy that skips the messages that fail to be processed.
IErrorPolicyChainBuilder ThenSkip(Action<SkipMessageErrorPolicyBuilder>? policyBuilderAction = null)
Parameters
policyBuilderActionAction<SkipMessageErrorPolicyBuilder>An Action<T> that takes the SkipMessageErrorPolicyBuilder and configures it.
Returns
- IErrorPolicyChainBuilder
The IErrorPolicyChainBuilder so that additional calls can be chained.
ThenStop(Action<StopConsumerErrorPolicyBuilder>?)
Adds a StopConsumerErrorPolicy that stops the consumer when an exception is thrown during the message processing.
IErrorPolicyChainBuilder ThenStop(Action<StopConsumerErrorPolicyBuilder>? policyBuilderAction = null)
Parameters
policyBuilderActionAction<StopConsumerErrorPolicyBuilder>An Action<T> that takes the StopConsumerErrorPolicyBuilder and configures it.
Returns
- IErrorPolicyChainBuilder
The IErrorPolicyChainBuilder so that additional calls can be chained.