Table of Contents

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

original MoveMessageErrorPolicy

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

string

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

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

Action<IOutboundEnvelope, Exception>

Methods

BuildCore(IServiceProvider)

Returns the actual error policy implementation, built using the provided IServiceProvider.

protected override ErrorPolicyImplementation BuildCore(IServiceProvider serviceProvider)

Parameters

serviceProvider IServiceProvider

The 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

other ErrorPolicyBase

Returns

bool

Equals(MoveMessageErrorPolicy?)

public virtual bool Equals(MoveMessageErrorPolicy? other)

Parameters

other MoveMessageErrorPolicy

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(MoveMessageErrorPolicy?, MoveMessageErrorPolicy?)

public static bool operator ==(MoveMessageErrorPolicy? left, MoveMessageErrorPolicy? right)

Parameters

left MoveMessageErrorPolicy
right MoveMessageErrorPolicy

Returns

bool

operator !=(MoveMessageErrorPolicy?, MoveMessageErrorPolicy?)

public static bool operator !=(MoveMessageErrorPolicy? left, MoveMessageErrorPolicy? right)

Parameters

left MoveMessageErrorPolicy
right MoveMessageErrorPolicy

Returns

bool