Table of Contents

Interface IErrorPolicyBuilder

Namespace
Silverback.Messaging.Configuration
Assembly
Silverback.Integration.dll

Builds the IErrorPolicy.

public interface IErrorPolicyBuilder

Methods

Build()

Builds the IErrorPolicy instance.

IErrorPolicy Build()

Returns

IErrorPolicy

The IMessageSerializer.

MoveTo(string, Action<MoveMessageErrorPolicyBuilder>?)

Adds a MoveMessageErrorPolicy that moves the messages that fail to be processed to the configured endpoint.

IErrorPolicyChainBuilder MoveTo(string endpointName, Action<MoveMessageErrorPolicyBuilder>? policyBuilderAction = null)

Parameters

endpointName string

The endpoint name. It could be either the topic/queue name or the friendly name of an endpoint that is already configured with a producer.

policyBuilderAction Action<MoveMessageErrorPolicyBuilder>

An Action<T> that takes the MoveMessageErrorPolicyBuilder and configures it.

Returns

IErrorPolicyChainBuilder

The IErrorPolicyBuilder so that additional calls can be chained.

Retry(Action<RetryErrorPolicyBuilder>?)

Adds a RetryErrorPolicy that retries to process the messages that previously failed to be to processed.

IErrorPolicyChainBuilder Retry(Action<RetryErrorPolicyBuilder>? policyBuilderAction = null)

Parameters

policyBuilderAction Action<RetryErrorPolicyBuilder>

An Action<T> that takes the RetryErrorPolicyBuilder and configures it.

Returns

IErrorPolicyChainBuilder

The IErrorPolicyBuilder so that additional calls can be chained.

Retry(int, Action<RetryErrorPolicyBuilder>?)

Adds a RetryErrorPolicy that retries to process the messages that previously failed to be to processed.

IErrorPolicyChainBuilder Retry(int retriesCount, Action<RetryErrorPolicyBuilder>? policyBuilderAction = null)

Parameters

retriesCount int

The maximum number of retries to be performed.

policyBuilderAction Action<RetryErrorPolicyBuilder>

An Action<T> that takes the RetryErrorPolicyBuilder and configures it.

Returns

IErrorPolicyChainBuilder

The IErrorPolicyBuilder so that additional calls can be chained.

Skip(Action<SkipMessageErrorPolicyBuilder>?)

Adds a SkipMessageErrorPolicy that skips the messages that fail to be processed.

IErrorPolicyChainBuilder Skip(Action<SkipMessageErrorPolicyBuilder>? policyBuilderAction = null)

Parameters

policyBuilderAction Action<SkipMessageErrorPolicyBuilder>

An Action<T> that takes the SkipMessageErrorPolicyBuilder and configures it.

Returns

IErrorPolicyChainBuilder

The IErrorPolicyBuilder so that additional calls can be chained.

Stop(Action<StopConsumerErrorPolicyBuilder>?)

Adds a StopConsumerErrorPolicy that stops the consumer when an exception is thrown during the message processing.

IErrorPolicyChainBuilder Stop(Action<StopConsumerErrorPolicyBuilder>? policyBuilderAction = null)

Parameters

policyBuilderAction Action<StopConsumerErrorPolicyBuilder>

An Action<T> that takes the StopConsumerErrorPolicyBuilder and configures it.

Returns

IErrorPolicyChainBuilder

The IErrorPolicyBuilder so that additional calls can be chained.