Inbox and outbox pattern
The inbox pattern and outbox pattern are two related patterns used by applications to persist data (usually in a database) to be used for operations with guaranteed delivery. The inbox and outbox concepts are used in the ActivityPub protocol and in email.
The inbox pattern
The application receives data which it persists to a inbox table. Once persisted another application, process or service can can read the inbox and use the data to do an operation and retry upon failure until completion, the operation may take a long time to complete. The inbox pattern ensures that a message was received (e.g. to a queue) successfully at least once.
The outbox pattern
The application persists data to a outbox table in a database. Once persisted another application or process can read from the outbox table and use that data to do an operation and retry upon failure until complete. The outbox pattern ensures that a message was sent (e.g. to a queue) successfully at least once.