Skip to content
v2.274.0

BackoffFunction Enum ​

Algorithms which can be used by SNS to calculate the delays associated with all of the retry attempts between the first and last retries in the backoff phase.

Example ​

ts
const myTopic = new sns.Topic(this, 'MyTopic');

myTopic.addSubscription(
  new subscriptions.UrlSubscription(
    'https://foobar.com/',
    {
      deliveryPolicy: {
        healthyRetryPolicy: {
          minDelayTarget: Duration.seconds(5),
          maxDelayTarget: Duration.seconds(10),
          numRetries: 6,
          backoffFunction: sns.BackoffFunction.EXPONENTIAL,
        },
        throttlePolicy: {
          maxReceivesPerSecond: 10,
        },
        requestPolicy: {
          headerContentType: 'application/json',
        },
      },
    },
  ),
);

Members ​

MemberDescription
ARITHMETICArithmetic, see {@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png this image} for how this function compares to others.
EXPONENTIALExponential, see {@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png this image} for how this function compares to others.
GEOMETRICGeometric, see {@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png this image} for how this function compares to others.
LINEARLinear, see {@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png this image} for how this function compares to others.

Referenced by ​

  • HealthyRetryPolicy.backoffFunctionbackoff_functionbackoffFunctionBackoffFunctionBackoffFunction