Share via


FixedAmqpRetryPolicy Class

public class FixedAmqpRetryPolicy
extends AmqpRetryPolicy

A policy to govern retrying of messaging operations in which the base delay between retries remains the same.

Constructor Summary

Constructor Description
FixedAmqpRetryPolicy(AmqpRetryOptions retryOptions)

Creates an instance with the given retry options.

Method Summary

Modifier and Type Method and Description
protected Duration calculateRetryDelay(int retryCount, Duration baseDelay, Duration baseJitter, ThreadLocalRandom random)

Calculates the delay for a fixed backoff.

boolean equals(Object obj)
int hashCode()

Methods inherited from AmqpRetryPolicy

Methods inherited from java.lang.Object

Constructor Details

FixedAmqpRetryPolicy

public FixedAmqpRetryPolicy(AmqpRetryOptions retryOptions)

Creates an instance with the given retry options.

Parameters:

retryOptions - The options to set on this retry policy.

Method Details

calculateRetryDelay

protected Duration calculateRetryDelay(int retryCount, Duration baseDelay, Duration baseJitter, ThreadLocalRandom random)

Calculates the delay for a fixed backoff.

Overrides:

FixedAmqpRetryPolicy.calculateRetryDelay(int retryCount, Duration baseDelay, Duration baseJitter, ThreadLocalRandom random)

Parameters:

retryCount - The number of attempts that have been made, including the initial attempt before any retries.
baseDelay - The delay to use for the fixed backoff.
baseJitter - The duration to use for the basis of the random jitter value.
random - The random number generator used to calculate the jitter.

Returns:

The duration to delay before retrying a request.

equals

public boolean equals(Object obj)

Overrides:

FixedAmqpRetryPolicy.equals(Object obj)

Parameters:

obj

hashCode

public int hashCode()

Overrides:

FixedAmqpRetryPolicy.hashCode()

Applies to