Class MoveMessageErrorPolicy
This policy moves the message that failed to be processed to the configured endpoint.
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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(Nullable<Int32>).
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. |
Methods
| Improve this doc View sourceBuildCore(IServiceProvider)
Declaration
protected override ErrorPolicyImplementation BuildCore(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
System.IServiceProvider | serviceProvider |
Returns
Type | Description |
---|---|
ErrorPolicyImplementation |
Overrides
| Improve this doc View sourceTransform(Action<IOutboundEnvelope, Exception>)
Defines an System.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 |
---|---|---|
System.Action<IOutboundEnvelope, System.Exception> | transformationAction | The System.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. |