aboutsummaryrefslogtreecommitdiffstats
path: root/datafile-app-server/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'datafile-app-server/src/main/java')
-rw-r--r--datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisher.java3
-rw-r--r--datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/FileCollector.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisher.java b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisher.java
index 8b86440a..c24c6c96 100644
--- a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisher.java
+++ b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisher.java
@@ -50,6 +50,7 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.web.util.DefaultUriBuilderFactory;
import reactor.core.publisher.Mono;
+import reactor.util.retry.Retry;
/**
* Publishes a file to the DataRouter.
@@ -85,7 +86,7 @@ public class DataRouterPublisher {
.cache() //
.flatMap(this::publishFile) //
.flatMap(httpStatus -> handleHttpResponse(httpStatus, publishInfo)) //
- .retryBackoff(numRetries, firstBackoff);
+ .retryWhen(Retry.backoff(numRetries,firstBackoff));
}
private Mono<HttpStatus> publishFile(FilePublishInformation publishInfo) {
diff --git a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/FileCollector.java b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/FileCollector.java
index b151b042..4b89f169 100644
--- a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/FileCollector.java
+++ b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/FileCollector.java
@@ -40,6 +40,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
import reactor.core.publisher.Mono;
+import reactor.util.retry.Retry;
/**
* Collects a file from a PNF.
@@ -79,7 +80,7 @@ public class FileCollector {
return Mono.just(fileData) //
.cache() //
.flatMap(fd -> tryCollectFile(fileData, contextMap)) //
- .retryBackoff(numRetries, firstBackoff) //
+ .retryWhen(Retry.backoff(numRetries,firstBackoff))
.flatMap(FileCollector::checkCollectedFile);
}