Transactional outbox
A pattern in which a service writes its event into a table in the same database transaction as its data, and a separate relay publishes the rows to the broker. It gives at-least-once publishing without a gap between the two writes.