Stores for Last-Value Availability

This topic presents the details of last-value availability for architects and administrators.

Topology

When using a persistence store to deliver the most recent values, the store is an intermediary hop between publishing and subscribing applications. In the following diagram, notice the absence of any direct path. The store is the only path from the publishing endpoint to the subscribing endpoints.

Persistence Store as Last-Value Intermediary

Dividing a Message Stream by Keys

The last-value durable in the preceding diagram divides its input message stream according to the value of the key field. That is, the durable stores exactly one message for each unique string value of the key field: that is, the most recent message containing that key value.

Each subscriber specifies a key value in its content matcher, and receives a corresponding sub-stream: that is, messages with that key value in the key field.

When a new subscriber links to the durable, it receives the last matching message stored in the durable. Thereafter, it continues to receive subsequent matching messages.

Acknowledgment

A subscriber does not acknowledge the messages it receives. The last-value durable does not track acknowledgments.

Key/Value Map

The essence of a key/value map is a two-column database, like the green rectangle in the preceding diagram. Programs can store key/value pairs and access the table using API calls.

FTL implements a map as a last-value durable. These two perspectives on the same type of durable are functionally equivalent.