Skip to content

Commit 14e3af8

Browse files
committed
Fix retry time for events processing
1 parent 0a55ba5 commit 14e3af8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Source/events.processing/Internal/EventProcessor.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ export abstract class EventProcessor<TIdentifier extends ConceptAs<Guid, string>
8585
const failure = new ProcessorFailure();
8686
failure.setReason(`${error}`);
8787
failure.setRetry(true);
88-
const retryAttempt = (retryProcessingState?.getRetrycount() ?? 0) + 1;
89-
const retrySeconds = Math.min(5 * retryAttempt, 60);
88+
const retrySeconds = retryProcessingState === undefined ? 5 : Math.min(5 * (retryProcessingState.getRetrycount() + 2), 60);
9089
const retryTimeout = new Duration();
9190
retryTimeout.setSeconds(retrySeconds);
9291
failure.setRetrytimeout(retryTimeout);

0 commit comments

Comments
 (0)