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 MaxFailedAttempts(int?).
Constructors
| Improve this doc View sourceMoveMessageErrorPolicy(IProducerEndpoint)
Initializes a new instance of the MoveMessageErrorPolicy class.
Declaration
public MoveMessageErrorPolicy(IProducerEndpoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
IProducerEndpoint | 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 MaxFailedAttempts(int?).
Methods
| Improve this doc View sourceBuildCore(IServiceProvider)
Returns the actual error policy implementation, built using the provided IServiceProvider.
Declaration
protected override ErrorPolicyImplementation BuildCore(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | serviceProvider | The IServiceProvider to be used to build the error policy. |
Returns
Type | Description |
---|---|
ErrorPolicyImplementation | An instance of IErrorPolicyImplementation that can be used to handle the processing error. |
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 MaxFailedAttempts(int?).
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<IOutboundEnvelope, Exception> | 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 |
---|---|
MoveMessageErrorPolicy | The MoveMessageErrorPolicy so that additional calls can be chained. |
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 MaxFailedAttempts(int?).