Class MoveMessageErrorPolicyBuilder
Builds the MoveMessageErrorPolicy.
Inheritance
Inherited Members
Namespace: Silverback.Messaging.Configuration
Assembly: Silverback.Integration.dll
Syntax
public class MoveMessageErrorPolicyBuilder : ErrorPolicyBaseBuilder<MoveMessageErrorPolicyBuilder>
Constructors
MoveMessageErrorPolicyBuilder(string)
Initializes a new instance of the MoveMessageErrorPolicyBuilder class.
Declaration
public MoveMessageErrorPolicyBuilder(string endpointName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | endpointName | 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.
Declaration
protected override MoveMessageErrorPolicyBuilder This { get; }
Property Value
| Type | Description |
|---|---|
| MoveMessageErrorPolicyBuilder |
Overrides
Remarks
This is necessary to work around casting in the base classes.
Methods
BuildCore()
Builds the error policy instance.
Declaration
protected override ErrorPolicyBase BuildCore()
Returns
| Type | Description |
|---|---|
| ErrorPolicyBase | The error policy. |
Overrides
Transform(Action<IOutboundEnvelope?, Exception>)
Specify a transformation to be applied to the message before it is moved.
Declaration
public MoveMessageErrorPolicyBuilder Transform(Action<IOutboundEnvelope?, Exception> transformationAction)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<IOutboundEnvelope, Exception> | transformationAction | The transformation action. |
Returns
| Type | Description |
|---|---|
| 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.
Declaration
public MoveMessageErrorPolicyBuilder Transform(Action<IOutboundEnvelope?> transformationAction)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<IOutboundEnvelope> | transformationAction | The transformation action. |
Returns
| Type | Description |
|---|---|
| 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.
Declaration
public MoveMessageErrorPolicyBuilder WithMaxRetries(int retries)
Parameters
| Type | Name | Description |
|---|---|---|
| int | retries | The number of times this policy should be applied. |
Returns
| Type | Description |
|---|---|
| MoveMessageErrorPolicyBuilder | The policy builder so that additional calls can be chained. |