Class DefaultRedeliveryPolicy
Represents the default redelivery policy used to determine message redelivery behavior.
Inherited Members
Namespace: CodersRealm.AmqpClient
Assembly: CodersRealm.AmqpClient.dll
Syntax
public class DefaultRedeliveryPolicy : RedeliveryPolicy, IRedeliveryPolicy, ICloneable
Remarks
This class provides a standard implementation of the redelivery policy for message destinations. It can be used as a base or fallback policy when no custom redelivery logic is required.
Methods
GetOutcome(IDestination)
Returns the provider-specific outcome to use when a message is rejected by the client after reaching the maximum redelivery threshold for the specified destination.
The returned integer should map to an outcome defined by the specific provider implementation:
For AMQP:
0 - ACCEPTED
1 - REJECTED
2 - RELEASED
3 - MODIFIED_FAILED
4 - MODIFIED_UNDELIVERABLE_HERE
For OpenWire:
0 - DeliveredAck
1 - PoisonAck
2 - ConsumedAck
3 - RedeliveredAck
4 - IndividualAck
5 - UnmatchedAck
6 - ExpiredAck
It is the responsibility of the provider to interpret the returned value appropriately.
Declaration
public override int GetOutcome(IDestination destination)
Parameters
| Type | Name | Description |
|---|---|---|
| IDestination | destination | The destination the message was received from. |
Returns
| Type | Description |
|---|---|
| int | An integer representing the provider-specific outcome code. |