Simplified message envelope for queueing messages into the outbox.
This is the type you use when calling outbox.queue() or outbox.send().
Hermes will add additional metadata (position, LSN, redeliveryCount) when
delivering the message via the HermesMessageEnvelope.
Message - The type of the domain message/event
Example
// Generate deterministic message ID constmessageId = constructMessageId('PatientRegistered', patientId)
// Queue with business logic in same transaction awaitsql.begin(async (sql) => { awaitstorePatient(patient, sql) awaitoutbox.queue(envelope, { tx:sql }) })
Simplified message envelope for queueing messages into the outbox.
This is the type you use when calling
outbox.queue()oroutbox.send(). Hermes will add additional metadata (position, LSN, redeliveryCount) when delivering the message via the HermesMessageEnvelope.Message - The type of the domain message/event
Example
See
HermesMessageEnvelope for the full envelope received in publish callback