Class MoveMessageErrorPolicy
- Namespace
- Silverback.Messaging.Consuming.ErrorHandling
- Assembly
- Silverback.Integration.dll
This policy moves the message that failed to be processed to the configured endpoint.
public record MoveMessageErrorPolicy : ErrorPolicyBase, IErrorPolicy, IEquatable<ErrorPolicyBase>, IEquatable<MoveMessageErrorPolicy>
- Inheritance
-
MoveMessageErrorPolicy
- Implements
- Inherited Members
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.
Constructors
MoveMessageErrorPolicy(MoveMessageErrorPolicy)
protected MoveMessageErrorPolicy(MoveMessageErrorPolicy original)
Parameters
originalMoveMessageErrorPolicy
Properties
EndpointName
Gets the destination endpoint name. It could be either the topic/queue name or the friendly name of an endpoint that is already configured with a producer.
public string EndpointName { get; }
Property Value
EqualityContract
protected override Type EqualityContract { get; }
Property Value
TransformMessageAction
Gets an Action<T1, T2> to be used to modify the message before moving it to the destination endpoint.
public Action<IOutboundEnvelope, Exception>? TransformMessageAction { get; init; }
Property Value
Methods
BuildCore(IServiceProvider)
Returns the actual error policy implementation, built using the provided IServiceProvider.
protected override ErrorPolicyImplementation BuildCore(IServiceProvider serviceProvider)
Parameters
serviceProviderIServiceProviderThe IServiceProvider to be used to build the error policy.
Returns
- ErrorPolicyImplementation
An instance of IErrorPolicyImplementation that can be used to handle the processing error.
Equals(ErrorPolicyBase?)
public override sealed bool Equals(ErrorPolicyBase? other)
Parameters
otherErrorPolicyBase
Returns
Equals(MoveMessageErrorPolicy?)
public virtual bool Equals(MoveMessageErrorPolicy? other)
Parameters
otherMoveMessageErrorPolicy
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(MoveMessageErrorPolicy?, MoveMessageErrorPolicy?)
public static bool operator ==(MoveMessageErrorPolicy? left, MoveMessageErrorPolicy? right)
Parameters
leftMoveMessageErrorPolicyrightMoveMessageErrorPolicy
Returns
operator !=(MoveMessageErrorPolicy?, MoveMessageErrorPolicy?)
public static bool operator !=(MoveMessageErrorPolicy? left, MoveMessageErrorPolicy? right)
Parameters
leftMoveMessageErrorPolicyrightMoveMessageErrorPolicy