Durable Types: Standard, Shared, and Last-Value

Compare the delivery behavior and message flow of the different FTL durable types.

  • In the absence of a durable, an FTL subscriber receives a message only when a transport bus connects it to the publisher. The message travels directly from publisher to subscriber.
  • Standard durables implement delivery assurance.

    The message travels directly from publisher to subscriber, but also from publisher to durable (within a persistence service). The durable retains the message until the the subscriber acknowledges it. If the subscriber misses a message while temporarily disconnected from the transport bus, it can retrieve the missed message from the durable.

    Delivery assurance with a standard durable is similiar to an EMS use case with persistent messages sent to a topic, and durable subscriptions on that topic.

  • Shared durables implement apportioning of messages.

    The message travels from publisher to durable, and then from the durable to a subscriber. The durable retains each message until one subscriber acknowledges it.

    Apportioning messages with a shared durable is similar to an EMS use case with messages sent to a queue, and several subscriptions on that queue. However, an EMS queue distributes messages to subscribers in a round robin, while an FTL shared durable distributes messages using a load-sharing scheme that is not strictly round robin.

  • Last-value durables implement last-value behavior with a key field.

    The message travels from publisher to durable, and then from the durable to subscribers. The durable uses the value in the key field to divide the messages into sub-streams, one for each key value. The durable stores only the most recent message for each key. A new subscriber specifies a key, and the durable forwards the last message with that key, and subsequent messages with that key (until the subscriber closes).

    Last-value behavior is not analogous to any EMS use case.

  • Map durables implement key/value maps.

    Map durables are a specialized use of last-value durables.

    In addition to last-value durable semantics, programs can use the FTL map API to get and set the current value corresponding to a specific key.