Building Reliable Agents with the Transactional Outbox Pattern and Redis Streams (opens in new tab)
First, write the message/event to a database OUTBOX table as part of the transaction that updates business objects, and then publish it to a message broker.
Read the original article