pg-transactional-outbox
Version:
A PostgreSQL based transactional outbox and inbox pattern implementation to support exactly once message processing (with at least once message delivery).
17 lines • 717 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultMessageNotFoundRetryStrategy = void 0;
/**
* Get the default strategy for retrying to find and lock a message that was not
* found. The default implementation will retry two more times.
*/
const defaultMessageNotFoundRetryStrategy = (config) => {
return (_message, lockingAttempts) => {
return {
retry: lockingAttempts <= config.settings.maxMessageNotFoundAttempts,
delayInMs: config.settings.maxMessageNotFoundDelayInMs,
};
};
};
exports.defaultMessageNotFoundRetryStrategy = defaultMessageNotFoundRetryStrategy;
//# sourceMappingURL=message-not-found-retry-strategy.js.map