llfix
Low-latency FIX engine
llfix::MessagePersistPlugin Class Referenceabstract

Interface for custom FIX message persistence plugins. More...

#include <message_persist_plugin.h>

Public Member Functions

virtual void persist_incoming_message (const std::string_view &session_name, uint32_t sequence_number, const char *buffer, std::size_t buffer_size)=0
 Persists an incoming FIX message. More...
 
virtual void persist_outgoing_message (const std::string_view &session_name, uint32_t sequence_number, const char *buffer, std::size_t buffer_size, bool successfully_transmitted)=0
 Persists an outgoing FIX message. More...
 

Detailed Description

Interface for custom FIX message persistence plugins.

MessagePersistPlugin allows users to implement custom persistence logic for FIX messages

To create a custom message persister, derive from this interface and implement both persist methods:

The plugin can be enabled by calling:

Member Function Documentation

◆ persist_incoming_message()

virtual void llfix::MessagePersistPlugin::persist_incoming_message ( const std::string_view &  session_name,
uint32_t  sequence_number,
const char *  buffer,
std::size_t  buffer_size 
)
pure virtual

Persists an incoming FIX message.

This method is invoked for every FIX message received by the engine

Parameters
session_nameLogical FIX session name.
sequence_numberFIX message sequence number.
bufferPointer to the raw FIX message buffer.
buffer_sizeSize of the FIX message buffer in bytes.
Note
The buffer is only valid for the duration of this call and must not be stored directly without copying.

◆ persist_outgoing_message()

virtual void llfix::MessagePersistPlugin::persist_outgoing_message ( const std::string_view &  session_name,
uint32_t  sequence_number,
const char *  buffer,
std::size_t  buffer_size,
bool  successfully_transmitted 
)
pure virtual

Persists an outgoing FIX message.

This method is invoked for every FIX message sent by the engine. The persistence callback includes information about whether the message was successfully transmitted.

Parameters
session_nameLogical FIX session name.
sequence_numberFIX message sequence number.
bufferPointer to the raw FIX message buffer.
buffer_sizeSize of the FIX message buffer in bytes.
successfully_transmittedIndicates whether the message was successfully sent to the peer.
Note
The buffer is only valid for the duration of this call and must not be stored directly without copying.

The documentation for this class was generated from the following file: