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).
15 lines • 1.04 kB
TypeScript
import { ExtendedError } from '../common/error';
import { ListenerConfig } from '../common/listener-config';
import { TransactionalLogger } from '../common/logger';
import { StoredTransactionalMessage } from '../message/transactional-message';
import { GeneralMessageHandler } from './general-message-handler';
import { HandlerStrategies } from './handler-strategies';
import { TransactionalMessageHandler } from './transactional-message-handler';
/**
* Create a function to execute the error handling orchestration logic for one
* message. It executes the retry attempts logic and executes the message
* handlers `handleError` function if it exists.
* That executor function will not throw an error.
*/
export declare const createErrorHandler: (messageHandlers: TransactionalMessageHandler[] | GeneralMessageHandler, strategies: HandlerStrategies, config: ListenerConfig, logger: TransactionalLogger) => ((message: StoredTransactionalMessage, error: ExtendedError) => Promise<boolean>);
//# sourceMappingURL=create-error-handler.d.ts.map