Type Alias OutboxConsumer<Event>Template

OutboxConsumer<Event>: {
    publish: Publish<Event>;
    start: Start;
    withScope: WithScope<Event>;
}

Describes how the OutboxConsumer object looks like.

Type Parameters

  • Event extends OutboxEvent

Starts the OutboxConsumer instance. It returns back when it starts listen to events.

Function to publish an event or events. Use it to ensure your events sending reliability.

You can scope all publish calls to a new transaction.

Event - Events handled by the OutboxConsumer. The type can be limited with a discrimitation union.