OnixS C++ FIX Engine  4.2.0
API Documentation
Pluggable Session Storage

Pluggable session storage is the storage which implemented by the user. For example, it could be used to implement High-Availability (HA) Solutions, one can implement a Pluggable Session Storage which stores data to shareable storage and if one server, with the FIX Engine, fails and another reserve server stands up then the FIX Engine can restore session states from the same shareable storage. Such a storage should implement the OnixS::FIX::ISessionStorage interface.

Implementing Pluggable Storage

There are few basic rules that should be applied to an implementation of Pluggable Storage.

Call Order of Pluggable Storage Methods

This section explains how different methods of Pluggable Storage are called in different situations.

Incoming message handling

If an exception is thrown by the user's code on any stage (during ISessionStorage or ISessionListener handling), the session becomes disconnected, and subsequent stages are omitted. Logout message will be sent to counterparty in dependency on the value of the OnixS::FIX::EngineSettings::sendLogoutOnException setting.

Outgoing message handling

Resend Request handling

Attaching Pluggable Storage

There is a quite schematic illustration for the pluggable storage usage.

// Declare the own class and implement ISessionStorage interface callbacks.
class MyPluggableStorage : public ISessionStorage { ... };
// Declare the instance of the storage.
MyPluggableStorage myStorage;
// Create the session which uses the storage.
Session initiator(senderCompId, targetCompId, dictionary, &listener, SessionStorageType::Pluggable, &myStorage);


Please, check the PluggableStorage sample, included into distribution package of FIX Engine.