Class MoveMessageErrorPolicy
This policy moves the message that failed to be processed to the configured endpoint.
Inherited Members
Namespace: Silverback.Messaging.Consuming.ErrorHandling
Assembly: Silverback.Integration.dll
Syntax
public record MoveMessageErrorPolicy : ErrorPolicyBase, IErrorPolicy, IEquatable<ErrorPolicyBase>, IEquatable<MoveMessageErrorPolicy>
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)
This policy moves the message that failed to be processed to the configured endpoint.
Declaration
protected MoveMessageErrorPolicy(MoveMessageErrorPolicy original)
Parameters
| Type | Name | Description |
|---|---|---|
| MoveMessageErrorPolicy | original |
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.
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.
Declaration
public string EndpointName { get; }
Property Value
| Type | Description |
|---|---|
| string |
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.
EqualityContract
This policy moves the message that failed to be processed to the configured endpoint.
Declaration
protected override Type EqualityContract { get; }
Property Value
| Type | Description |
|---|---|
| Type |
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.
TransformMessageAction
Gets an Action<T1, T2> to be used to modify the message before moving it to the destination endpoint.
Declaration
public Action<IOutboundEnvelope, Exception>? TransformMessageAction { get; init; }
Property Value
| Type | Description |
|---|---|
| Action<IOutboundEnvelope, Exception> |
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.
Methods
BuildCore(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.
Equals(ErrorPolicyBase?)
This policy moves the message that failed to be processed to the configured endpoint.
Declaration
public override sealed bool Equals(ErrorPolicyBase? other)
Parameters
| Type | Name | Description |
|---|---|---|
| ErrorPolicyBase | other |
Returns
| Type | Description |
|---|---|
| bool |
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.
Equals(MoveMessageErrorPolicy?)
This policy moves the message that failed to be processed to the configured endpoint.
Declaration
public virtual bool Equals(MoveMessageErrorPolicy? other)
Parameters
| Type | Name | Description |
|---|---|---|
| MoveMessageErrorPolicy | other |
Returns
| Type | Description |
|---|---|
| bool |
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.
Equals(object?)
This policy moves the message that failed to be processed to the configured endpoint.
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
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.
GetHashCode()
This policy moves the message that failed to be processed to the configured endpoint.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
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.
PrintMembers(StringBuilder)
This policy moves the message that failed to be processed to the configured endpoint.
Declaration
protected override bool PrintMembers(StringBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| StringBuilder | builder |
Returns
| Type | Description |
|---|---|
| bool |
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.
ToString()
This policy moves the message that failed to be processed to the configured endpoint.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
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.
Operators
operator ==(MoveMessageErrorPolicy?, MoveMessageErrorPolicy?)
This policy moves the message that failed to be processed to the configured endpoint.
Declaration
public static bool operator ==(MoveMessageErrorPolicy? left, MoveMessageErrorPolicy? right)
Parameters
| Type | Name | Description |
|---|---|---|
| MoveMessageErrorPolicy | left | |
| MoveMessageErrorPolicy | right |
Returns
| Type | Description |
|---|---|
| bool |
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.
operator !=(MoveMessageErrorPolicy?, MoveMessageErrorPolicy?)
This policy moves the message that failed to be processed to the configured endpoint.
Declaration
public static bool operator !=(MoveMessageErrorPolicy? left, MoveMessageErrorPolicy? right)
Parameters
| Type | Name | Description |
|---|---|---|
| MoveMessageErrorPolicy | left | |
| MoveMessageErrorPolicy | right |
Returns
| Type | Description |
|---|---|
| bool |
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.