diff --git a/backend/core/src/main/java/org/opencdmp/integrationevent/outbox/OutboxProperties.java b/backend/core/src/main/java/org/opencdmp/integrationevent/outbox/OutboxProperties.java index 82e07e717..414bc1fea 100644 --- a/backend/core/src/main/java/org/opencdmp/integrationevent/outbox/OutboxProperties.java +++ b/backend/core/src/main/java/org/opencdmp/integrationevent/outbox/OutboxProperties.java @@ -97,6 +97,10 @@ public class OutboxProperties { return this.handleAckWaitInMilliSeconds; } + public int getHandleNackWaitInMilliSeconds() { + return this.handleNackWaitInMilliSeconds; + } + public String getTenantDefaultLocaleRemovalTopic() { return this.tenantDefaultLocaleRemovalTopic; } diff --git a/backend/core/src/main/java/org/opencdmp/integrationevent/outbox/OutboxRepositoryImpl.java b/backend/core/src/main/java/org/opencdmp/integrationevent/outbox/OutboxRepositoryImpl.java index 6f321889b..1b2923c8e 100644 --- a/backend/core/src/main/java/org/opencdmp/integrationevent/outbox/OutboxRepositoryImpl.java +++ b/backend/core/src/main/java/org/opencdmp/integrationevent/outbox/OutboxRepositoryImpl.java @@ -382,7 +382,7 @@ public class OutboxRepositoryImpl implements OutboxRepository { } catch (OptimisticLockException ex) { logger.warn("Problem handle nack {}. Rolling back any message emit db changes and marking error. Retrying...", nackedMessages.stream().map(UUID::toString).collect(Collectors.joining(","))); if (transaction != null) transaction.rollback(); - Thread.sleep(this.outboxProperties.getHandleNackRetries()); + Thread.sleep(this.outboxProperties.getHandleNackWaitInMilliSeconds()); } catch (Exception ex) { logger.error("Problem executing purge. rolling back any db changes and marking error. Continuing...", ex); if (transaction != null) transaction.rollback();