0
const df = require("durable-functions");

module.exports = df.orchestrator(function*(context) {
    const retryOptions = new df.RetryOptions(5000, 3);

    yield context.df.callActivityWithRetry("FlakyFunction", retryOptions);

    // ...
});

There are several options for customizing the automatic retry policy. They include the following:

Max number of attempts: The maximum number of retry attempts.

First retry interval: The amount of time to wait before the first retry attempt.

Backoff coefficient: The coefficient used to determine rate of increase of backoff. Defaults to 1.

How to set Backoff coefficient?

Joy Wang
  • 39,905
  • 3
  • 30
  • 54
Nafis Islam
  • 1,483
  • 1
  • 14
  • 34

1 Answers1

1

The constructor of RetryOptions takes only two parameters, just set backoffCoefficient after construction, same as other parameters.

const retryOptions = new df.RetryOptions(5000, 3);
retryOptions.backoffCoefficient = 2;
Jerry Liu
  • 17,282
  • 4
  • 40
  • 61