Show / Hide Table of Contents

Interface IRedeliveryPolicy

Represents the redelivery policy used by the AMQP client for supporting message brokers.

Inherited Members
ICloneable.Clone()
Namespace: CodersRealm.AmqpClient
Assembly: CodersRealm.AmqpClient.dll
Syntax
public interface IRedeliveryPolicy : ICloneable

Properties

BackOffMultiplier

Gets or sets the back off multiplier.

Declaration
int BackOffMultiplier { get; set; }
Property Value
Type Description
int

The back off multiplier.

CollisionAvoidancePercent

Gets or sets the collision avoidance percent. This causes the redelivery delay to be adjusted in order to avoid possible collision when messages are redelivered to concurrent consumers.

Declaration
int CollisionAvoidancePercent { get; set; }
Property Value
Type Description
int

The collision avoidance factor.

InitialRedeliveryDelay

The time in milliseconds to initially delay a redelivery

Declaration
int InitialRedeliveryDelay { get; set; }
Property Value
Type Description
int

The initial redelivery delay.

MaximumRedeliveries

Gets or sets the maximum redeliveries. A value less than zero indicates that there is no maximum and the NMS provider should retry forever.

Declaration
int MaximumRedeliveries { get; set; }
Property Value
Type Description
int

The maximum redeliveries.

UseCollisionAvoidance

Gets or sets a value indicating whether to [use collision avoidance].

Declaration
bool UseCollisionAvoidance { get; set; }
Property Value
Type Description
bool

true if [use collision avoidance]; otherwise, false.

UseExponentialBackOff

Gets or sets a value indicating whether [use exponential back off].

Declaration
bool UseExponentialBackOff { get; set; }
Property Value
Type Description
bool

true if [use exponential back off]; otherwise, false.

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
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.

RedeliveryDelay(int)

The time in milliseconds to delay a redelivery

Declaration
int RedeliveryDelay(int redeliveredCounter)
Parameters
Type Name Description
int redeliveredCounter

The redelivered counter.

Returns
Type Description
int
In this article
Back to top Generated by DocFX