Table of Contents

Class MoveMessageErrorPolicyBuilder

Namespace
Silverback.Messaging.Configuration
Assembly
Silverback.Integration.dll
public class MoveMessageErrorPolicyBuilder : ErrorPolicyBaseBuilder<MoveMessageErrorPolicyBuilder>
Inheritance
MoveMessageErrorPolicyBuilder
Inherited Members

Constructors

MoveMessageErrorPolicyBuilder(string)

Initializes a new instance of the MoveMessageErrorPolicyBuilder class.

public MoveMessageErrorPolicyBuilder(string endpointName)

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.

Properties

This

Gets this instance.

protected override MoveMessageErrorPolicyBuilder This { get; }

Property Value

MoveMessageErrorPolicyBuilder

Remarks

This is necessary to work around casting in the base classes.

Methods

BuildCore()

Builds the error policy instance.

protected override ErrorPolicyBase BuildCore()

Returns

ErrorPolicyBase

The error policy.

Transform(Action<IOutboundEnvelope?, Exception>)

Specify a transformation to be applied to the message before it is moved.

public MoveMessageErrorPolicyBuilder Transform(Action<IOutboundEnvelope?, Exception> transformationAction)

Parameters

transformationAction Action<IOutboundEnvelope, Exception>

The transformation action.

Returns

MoveMessageErrorPolicyBuilder

The policy builder so that additional calls can be chained.

Transform(Action<IOutboundEnvelope?>)

Specify a transformation to be applied to the message before it is moved.

public MoveMessageErrorPolicyBuilder Transform(Action<IOutboundEnvelope?> transformationAction)

Parameters

transformationAction Action<IOutboundEnvelope>

The transformation action.

Returns

MoveMessageErrorPolicyBuilder

The policy builder so that additional calls can be chained.

WithMaxRetries(int)

Sets the number of times this policy should be applied to the same message in case of multiple failed attempts.

public MoveMessageErrorPolicyBuilder WithMaxRetries(int retries)

Parameters

retries int

The number of times this policy should be applied.

Returns

MoveMessageErrorPolicyBuilder

The policy builder so that additional calls can be chained.