Skip to content

Commit 31b73f3

Browse files
committed
[NOD-706] fix: added @ExponentialBackoffRetry annotation for explicit retry
1 parent 1b48510 commit 31b73f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/it/gov/pagopa/nodoverifykotodatastore/NodoVerifyKOEventToDataStore.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
public class NodoVerifyKOEventToDataStore {
2424

2525
@FunctionName("EventHubNodoVerifyKOEventToDSProcessor")
26+
@ExponentialBackoffRetry(maxRetryCount = 5, maximumInterval = "00:15:00", minimumInterval = "00:00:10")
2627
public void processNodoVerifyKOEvent (
2728
@EventHubTrigger(
2829
name = "NodoVerifyKOEvent",
@@ -79,7 +80,7 @@ public void processNodoVerifyKOEvent (
7980
eventsToPersist.add(event);
8081
}
8182

82-
logger.log(Level.INFO, () -> String.format("Performing event ingestion: InvocationId [%s], Events: %s", context.getInvocationId(), extractTraceForEventsToPersist(eventsToPersist)));
83+
logger.log(Level.INFO, () -> String.format("Performing event ingestion: InvocationId [%s], Retry Attempt [%d], Events: %s", context.getInvocationId(), context.getRetryContext() == null ? -1 : context.getRetryContext().getRetrycount(), extractTraceForEventsToPersist(eventsToPersist)));
8384

8485
// save all events in the retrieved batch in the storage
8586
persistEventBatch(logger, documentdb, eventsToPersist);

0 commit comments

Comments
 (0)