From 62f81cc3e3123e9d00caf054b990896cc1f4e08f Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Tue, 28 Jan 2025 17:15:47 +0100 Subject: [PATCH] chore: Use public api for exp backoff delay (#1268) --- .../src/main/scala/akka/projection/dynamodb/Requests.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/akka-projection-dynamodb/src/main/scala/akka/projection/dynamodb/Requests.scala b/akka-projection-dynamodb/src/main/scala/akka/projection/dynamodb/Requests.scala index 8bf73db6b..a7a997e73 100644 --- a/akka-projection-dynamodb/src/main/scala/akka/projection/dynamodb/Requests.scala +++ b/akka-projection-dynamodb/src/main/scala/akka/projection/dynamodb/Requests.scala @@ -11,7 +11,7 @@ import scala.jdk.CollectionConverters._ import akka.actor.typed.ActorSystem import akka.annotation.InternalApi -import akka.pattern.BackoffSupervisor +import akka.pattern.RetrySupport import akka.pattern.after import org.slf4j.Logger import org.slf4j.LoggerFactory @@ -59,7 +59,7 @@ object Requests { Future.failed(failOnMaxRetries(response)) } else { // retry after exponential backoff val nextRetry = retries + 1 - val delay = BackoffSupervisor.calculateDelay(retries, minBackoff, maxBackoff, randomFactor) + val delay = RetrySupport.calculateExponentialBackoffDelay(retries, minBackoff, maxBackoff, randomFactor) onRetry(response, nextRetry, delay) after(delay) { retry(