UNPKG

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).

19 lines (17 loc) 563 B
import { ReplicationConcurrencyController } from './concurrency-controller'; /** * This controller allows full concurrency without any locking mechanism * @returns The controller with "empty" acquire and release functions */ export const createReplicationFullConcurrencyController = (): ReplicationConcurrencyController => ({ // eslint-disable-next-line require-await async acquire() { return () => { // does not lock --> no need to release }; }, cancel(): void { // does not lock --> no way to cancel }, });