Inbox And Outbox Pattern
   HOME

TheInfoList



OR:

{{Orphan, date=April 2023 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 ActivityPub is a Communication protocol, protocol and open standard for Decentralised system, decentralized Social networking service, social networking. It provides a Client–server model, client-to-server (C2S) API for creating and modifying c ...
protocol and in email.


The inbox pattern

The application receives data which it persists to an inbox table in a database. Once the data has been persisted another application, process or service can read from the inbox table and use the data to perform an operation which it can 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 an outbox table in a database. Once the data has been persisted another application or process can read from the outbox table and use that data to perform an operation which it can retry upon failure until completion. The outbox pattern ensures that a message was sent (e.g. to a queue) successfully at least once.


See also

*
Enterprise service bus An enterprise service bus (ESB) implements a communication system between mutually interacting software applications in a service-oriented architecture (SOA). It represents a software architecture for distributed computing, and is a special vari ...
*
Message broker A message broker (also known as an integration broker or interface engine) is an intermediary computer program module that translates a message from the formal messaging protocol of the sender to the formal messaging protocol of the receiver. Mes ...


External links


Push-based Outbox Pattern with Postgres Logical Replication
Software design patterns