fix OptimisticLockException for ack recieved before process status saved
This commit is contained in:
parent
637e1cb53f
commit
9ec90d6c8d
|
@ -97,6 +97,10 @@ public class OutboxProperties {
|
|||
return this.handleAckWaitInMilliSeconds;
|
||||
}
|
||||
|
||||
public int getHandleNackWaitInMilliSeconds() {
|
||||
return this.handleNackWaitInMilliSeconds;
|
||||
}
|
||||
|
||||
public String getTenantDefaultLocaleRemovalTopic() {
|
||||
return this.tenantDefaultLocaleRemovalTopic;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue