Using an Outbox for Messages
Explore the implementation of the transactional outbox pattern, which involved setting up local processes to publish messages stored in an outbox table.
To implement the Transactional Outbox pattern, we will be splitting the existing publishing action into two parts. The first part will consist of saving the outgoing message into the database, and the second part will be implemented as a new processor that will receive or check for records that are written into the database so that it can publish them to where they need to go. The first part of the Transactional Outbox pattern is shown in the below figure. The transaction that we are creating for each request will be used so that all changes from whatever work we have done, and messages, are saved atomically:
Get hands-on with 1400+ tech skills courses.