Stores and Durables

As the phrase store-and-forward intermediary suggests, the intermediary provides its functionality in two phases. Two types of data structure, store and durable, facilitate these phases.

Store

A persistence store, or more briefly, a store, is a data structure that collects and stores a stream of messages from publishers.

Each store maintains exactly one message stream. It can collect that stream from one or more publishers. It can maintain that message stream for potentially many subscribers.

Durable

Within a store, durables maintain subscriber interest, forward messages, and track delivery acknowledgements.

  • A standard durable represents the interest of one subscriber object. It strengthens delivery assurance for that subscriber, forwarding messages to the subscriber on request.
  • A shared durable represents the identical interest of two or more cooperating subscriber objects. It apportions a message stream among those subscribers, forwarding each message to only one available subscriber. (That subscriber can reforward the message to a different subscriber if necessary.)
  • A last-value durable represents the interest of potentially many independent subscriber objects. It divides its input message stream into a set of output sub-streams, storing only the most recent messages for each sub-stream. Upon subscribing, each new subscriber receives the most recent message. The durable continues to forward subsequent messages as they arrive.