Template
Optional
now?: NowFunctionOptional
onDbError?: ErrorCallbackOptional
onFailedPublish?: ErrorCallbackOptional
partitionKey?: stringOptional
saveTimestamps?: booleanUse with consciously and carefully.
When true
, Hermes will be affecting many documents, resulting in much more I/O operations.
Optional
shouldDisposeOnSigterm?: booleanOptional
waitAfterFailedPublishMs?: numberA callback implemented on the client that is rensposible to publish an event.
It can utilize an event bus like RabbitMQ, Apache Pulsar or whatever is needed.
It takes an event
of Event
.
The most important is to throw an error on a failed publish. Otherwise, the OutboxConsumer
won't consider the event as published.
Time after the OutboxConsumer
will wait after a failed event publish.
Indicates whether the OutboxConsumer
should register a cleaning callback on SIGTERM
and SIGINT
.
Creation parameters of
OutboxConsumer
.