Class MoveMessageErrorPolicyBuilder
- Namespace
- Silverback.Messaging.Configuration
- Assembly
- Silverback.Integration.dll
Builds the MoveMessageErrorPolicy.
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
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.
Properties
This
Gets this instance.
protected override MoveMessageErrorPolicyBuilder This { get; }
Property Value
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
transformationActionAction<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
transformationActionAction<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
retriesintThe number of times this policy should be applied.
Returns
- MoveMessageErrorPolicyBuilder
The policy builder so that additional calls can be chained.