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

Pluggable session storage is the storage which implemented by the user. 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);

Example

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