...

/

Using an Inbox for Messages

Using an Inbox for Messages

Learn how to implement message inboxes for the Depot module.

We have now updated the Depot module so that we can work with a single database connection and transaction. We want to now use that to make our database interactions and message publishing atomic.

When we make the publishing and handling of the messages atomic alongside the other changes that are saved into our database, we gain the following benefits:

  • Idempotent message processing: We can be sure that the message that we are processing will only be processed a single time.

  • No application state fragmentation: When state changes occur in our application, they will be saved as a single unit or not at all.

With the majority of the work to set up the transactions behind us, we can now implement the inboxes and outboxes ...