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).
14 lines • 986 B
TypeScript
import { TransactionalMessage } from '../../message/transactional-message';
import { ReplicationConcurrencyController } from './concurrency-controller';
export type ReplicationMultiConcurrencyType = 'mutex' | 'semaphore' | 'full-concurrency' | 'segment-mutex';
/**
* Use different mutex controllers depending on the desired concurrency level
* for different messages. If a semaphore concurrency controller should be used,
* the `maxSemaphoreParallelism` should be set.
* @param getConcurrencyType Implements the logic which concurrency controller should be used e.g. based on the aggregate and message type
* @returns The controller to acquire and release the mutex
*/
export declare const createReplicationMultiConcurrencyController: (getConcurrencyType: (message: TransactionalMessage) => ReplicationMultiConcurrencyType, settings?: {
maxSemaphoreParallelism?: number;
}) => ReplicationConcurrencyController;
//# sourceMappingURL=create-multi-concurrency-controller.d.ts.map