Performance: Persistent and Non-Persistent Messages
Each persistence store is configured for either persistent messages or non-persistent messages. If you need both types of messages, configure additional persistence stores.
In FTL, persistent messages are configured by enabling replication for the persistence store. Non-persistent messages are configured by disabling replication for the persistence store.
Use persistent messages whenever delivery assurance is required.
Persistent messages (and acknowledgments of persistent messages) are replicated to all members of the persistence cluster. (Strictly speaking, FTL server sends a confirmation to the producer once a majority of all members have stored the message.)
Persistent messages (and acknowledgments) might optionally be written to disk.
However, this comes at the cost of some performance: before FTL server can send a confirmation to the producer, it must incur the cost of a network round-trip to the replicas and, optionally, a disk write. The same applies to consumers that acknowledge messages synchronously.
By contrast, non-persistent messages exist only in the memory of the leader of the persistence cluster. This eliminates the network and disk cost, but non-persistent messages are lost whenever the leader restarts.
To configure a persistence store for replicated (persistent) messaging or non-replicated (non-persistent) messaging, see Stores Grid.