Class MoveMessageErrorPolicy
This policy moves the message that failed to be processed to the configured endpoint.
Implements
Inherited Members
Namespace: Silverback.Messaging.Inbound.ErrorHandling
Assembly: Silverback.Integration.dll
Syntax
public class MoveMessageErrorPolicy : RetryableErrorPolicyBase, IErrorPolicy
Remarks
This policy can be used also to move the message at the end of the current topic to retry it later on.
The number of retries can be limited using Max
Constructors
| Improve this doc View sourceMoveMessageErrorPolicy(IProducerEndpoint)
Initializes a new instance of the Move
Declaration
public MoveMessageErrorPolicy(IProducerEndpoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
IProducer |
endpoint | The endpoint to move the message to. |
Remarks
This policy can be used also to move the message at the end of the current topic to retry it later on.
The number of retries can be limited using Max
Methods
| Improve this doc View sourceBuildCore(IServiceProvider)
Returns the actual error policy implementation, built using the provided
IService
Declaration
protected override ErrorPolicyImplementation BuildCore(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
IService |
serviceProvider | The IService |
Returns
Type | Description |
---|---|
Error |
An instance of IError |
Overrides
Remarks
This policy can be used also to move the message at the end of the current topic to retry it later on.
The number of retries can be limited using Max
Transform(Action<IOutboundEnvelope, Exception>)
Defines an Action<T> to be called to modify (or completely rewrite) the message being moved.
Declaration
public MoveMessageErrorPolicy Transform(Action<IOutboundEnvelope, Exception> transformationAction)
Parameters
Type | Name | Description |
---|---|---|
Action<IOutbound |
transformationAction | The Action<T> to be called to modify the message. This function can be used to modify or replace the message body and its headers. |
Returns
Type | Description |
---|---|
Move |
The Move |
Remarks
This policy can be used also to move the message at the end of the current topic to retry it later on.
The number of retries can be limited using Max