Setu-TS
    Preparing search index...

    Type Alias IntegrationEventInboxHandler<T, S>

    IntegrationEventInboxHandler: (
        payload: T,
        envelope: IntegrationEventEnvelope<T>,
        metadata: MessageMetadata,
        scope: S,
    ) => void | Promise<void>

    Handles one delivered integration event inside the consumer inbox's transaction (M108).

    The first three arguments are those of IntegrationEventHandler; the fourth is the unit of work of the transaction the inbox marker was created in. Write through it, and the writes commit together with the marker or not at all. With createDatabaseInboxStore() it is the database plugin's IUnitOfWork; annotate the parameter with that type and S is inferred from the annotation.

    Type Parameters

    • T

      The event payload type the definition's parser produces

    • S = unknown

      The unit-of-work type the configured inbox store supplies

    Type Declaration

    0.9.0