OnixS C++ CME Market Data Handler  2.56.0.0
Public Member Functions | Public Attributes | List of all members
HandlerSettings Struct Reference

Handler's configuration settings. More...

Public Member Functions

 HandlerSettings ()
 Initializes parameters with default values.
 
 ~HandlerSettings ()
 Cleans everything up.
 
std::string toString () const
 Returns textual presentation.
 
void toString (std::string &) const
 Returns textual presentation.
 
- Public Member Functions inherited from InitializationSettings
 InitializationSettings ()
 Initializes settings with default values.
 
 ~InitializationSettings ()
 Cleans up all resources.
 
std::string toString () const
 Returns the text representation.
 
void toString (std::string &) const
 Appends the text representation.
 

Public Attributes

String channelId
 ID of the CME FIX/FAST market data channel from the channels configuration XML file. More...
 
String channelsConfigurationFile
 Path to the channels configuration XML file.
 
String codingTemplatesFile
 Path to CME FAST templates xml file.
 
bool cacheSecurityDefinitions
 Option to use file-based caching of the security definitions. More...
 
bool recoverSecurityDefinitionsOnGap
 Option to recover the Security Definition messages each time when the message sequence gap is detected. More...
 
unsigned int directBookDepth
 Defines depth of direct order book for the instrument whose definition wasn't received or had no corresponding data. More...
 
unsigned int impliedBookDepth
 Defines depth of implied order book for the instrument whose definition wasn't received or had no corresponding data. More...
 
bool useTcpReplay
 Option to use the TCP Replay feed. More...
 
String tcpReplayUsername
 User identifier or username to be used in the Logon (35=A) message from customer to CME. More...
 
String tcpReplayPassword
 Password or passphrase to be used in the Logon (35=A) message from customer to CME. More...
 
unsigned int tcpReplayReconnectAttempts
 Number of attempts to receive missed messages via the TCP Replay Channel. More...
 
unsigned int tcpReplayReconnectInterval
 Interval between the attempts to receive missed packets via the TCP Replay feed if previous attempt either failed or was rejected. More...
 
unsigned int tcpReplayRequestTimeframe
 Amount of time allocated to process TCP replay request. More...
 
bool useIncrementalFeedA
 Option to use the Incremental feed "A". More...
 
bool useIncrementalFeedB
 Option to use the Incremental feed "B". More...
 
bool useInstrumentReplayFeedA
 Option to use the Instrument Replay feed "A". More...
 
bool useInstrumentReplayFeedB
 Option to use the Instrument Replay feed "B". More...
 
bool useSnapshotFeedA
 Option to use the Snapshot feed "A". More...
 
bool useSnapshotFeedB
 Option to use the Snapshot feed "B". More...
 
unsigned int heartbeatInterval
 Specifies maximal time interval between two network packets. More...
 
LogMode logMode
 Specifies whether the Handler should log its events and which of events should be put into the log. More...
 
AdvancedLogOptionSet advancedLogOptions
 Additional options to control which data is to be logged. More...
 
String logDirectory
 Log files are stored in this directory. More...
 
String logFileNamePrefix
 Log file name are started from the prefix. More...
 
long long logFileSizeLimit
 Log file size limit (in bytes). More...
 
String networkInterface
 Specifies one or more network interfaces to use while joining the multicast group; use semi-colon delimited list if more than one. More...
 
String networkInterfaceA
 Specifies one or more network interfaces to use for "A" feeds while joining the multicast group; use semi-colon delimited list if more than one. More...
 
String networkInterfaceB
 Specifies one or more network interfaces to use for "B" feeds while joining the multicast group; use semi-colon delimited list if more than one. More...
 
unsigned int packetQueueMaxSize
 Maximum number of packets to be hold in internal queues used by the Handler while processing incoming market data. More...
 
unsigned int maxPacketSize
 Max size for network packet transmitted by MDP. More...
 
unsigned int packetPoolMaxSize
 Limits packet pool size. More...
 
unsigned int outOfOrderPacketMaxInterval
 Defines value of threshold used by Handler to differ out-of-order packets from gaps. More...
 
unsigned int lostPacketWaitTime
 Indicates for how long Handler should wait for the packet before it's considered as totally lost. More...
 
unsigned int udpSocketBufferSize
 Defines size of buffer in bytes for UDP/multicast sockets. More...
 
unsigned int tcpSocketReceiveBufferSize
 Defines size of buffer in bytes for TCP replay receiving socket. More...
 
ThreadAffinity threadsAffinity
 Defines set of CPUs by their indices (starting from zero) allowed for each thread used by the Handler while processing market data to be executed on. More...
 
PacketsPullingStrategy packetsPullingStrategy
 Defines market data processing strategy. More...
 
unsigned int repeatingGroupEntriesMaxCount
 Maximum number of repeating group entries. More...
 
unsigned int ioCompletionWaitTime
 Defines amount of time Handler spends on socket waiting for I/O completion result. More...
 
bool useUniversalTime
 Indicates whether local or UTC time is used by the Handler while assigning timestamps to log events and packets received. More...
 
bool forceDirectBookMaintenance
 Forces Handler to build direct order book. More...
 
bool forceImpliedBookMaintenance
 Forces Handler to build implied order book. More...
 
bool forceConsolidatedBookMaintenance
 Forces Handler to build consolidated order book. More...
 
BookUpdateNotificationStrategy bookUpdateNotificationStrategy
 Book update notification strategy. More...
 
- Public Attributes inherited from InitializationSettings
String licenseStore
 Path to the folder in which licenses are stored. More...
 

Detailed Description

Handler's configuration settings.

Member Data Documentation

AdvancedLogOptionSet advancedLogOptions

Additional options to control which data is to be logged.

Ignored if logging is disabled.

Note
The default value is AdvancedLogOptions::LogEverything.
BookUpdateNotificationStrategy bookUpdateNotificationStrategy

Book update notification strategy.

Defines the way Handler raises order book update event.

Note
Default strategy is BookUpdateNotificationStrategies::EndOfMessage.
bool cacheSecurityDefinitions

Option to use file-based caching of the security definitions.

Note
The default value is 'false'.
Warning
If this option is activated then it is recommended to remove the cache file weekly to start the trading week with the fresh copy of security definitions.
String channelId

ID of the CME FIX/FAST market data channel from the channels configuration XML file.

unsigned int directBookDepth

Defines depth of direct order book for the instrument whose definition wasn't received or had no corresponding data.

Note
Default value is 10.
bool forceConsolidatedBookMaintenance

Forces Handler to build consolidated order book.

Unless book update listener is registered or best bid/ask is tracked, Handler doesn't construct and thus doesn't maintain order book. If book isn't maintained, snapshot retrieval is not possible.

Note
Default value is 'false'.
bool forceDirectBookMaintenance

Forces Handler to build direct order book.

Unless book update listener is registered or best bid/ask is tracked, Handler doesn't construct and thus doesn't maintain order book. If book isn't maintained, snapshot retrieval is not possible.

Note
Default value is 'false'.
bool forceImpliedBookMaintenance

Forces Handler to build implied order book.

Unless book update listener is registered or best bid/ask is tracked, Handler doesn't construct and thus doesn't maintain order book. If book isn't maintained, snapshot retrieval is not possible.

Note
Default value is 'false'.
unsigned int heartbeatInterval

Specifies maximal time interval between two network packets.

If no data is received during specified time frame, warning is reported.

Interval is measured in seconds.

Note
The default value is '30'.
unsigned int impliedBookDepth

Defines depth of implied order book for the instrument whose definition wasn't received or had no corresponding data.

Note
Default value is 2.
unsigned int ioCompletionWaitTime

Defines amount of time Handler spends on socket waiting for I/O completion result.

Time is measured in milliseconds.

Note
Default value is '10'.
Warning
Given parameter significantly affects Handler's responsiveness and load onto CPU!
String logDirectory

Log files are stored in this directory.

Ignored if logging is disabled.

String logFileNamePrefix

Log file name are started from the prefix.

Ignored if logging is disabled.

long long logFileSizeLimit

Log file size limit (in bytes).

Handler detaches logged data into separate file upon reaching given size limit.

Note
Default value is '2145386496'.
LogMode logMode

Specifies whether the Handler should log its events and which of events should be put into the log.

Note
The default value is LogModes::Regular.
unsigned int lostPacketWaitTime

Indicates for how long Handler should wait for the packet before it's considered as totally lost.

Due to unreliable nature of multicast, data transmitted by MDP may come in order other than original or be completely lost. When Handler receives packet with sequence number greater than expected, it considers received data as out-of-order. If for a certain time interval Handler receives missing data, Handler resumes normal data processing. However, if no data is received for predefined time frame, Handler considers missing data as lost and raises packet gap event. Given parameter defines size of time interval Handler waits for missing data.

Note
When out-of-order packet is received, Handler makes a decision on data loss if either waiting time is over or if newly received packet has sequence number greater than 'seqNumberOfLastReceivedPacket + outOfOrderPacketMaxInterval'.
See Also
'outOfOrderPacketMaxInterval' parameter for more information.

Time interval is measured in microseconds (usec).

Note
The default value is '100000' (100 milliseconds).
unsigned int maxPacketSize

Max size for network packet transmitted by MDP.

Note
Default value is '1500'.
String networkInterface

Specifies one or more network interfaces to use while joining the multicast group; use semi-colon delimited list if more than one.

Note
On Linux the network interface is specified by its name, on Windows - by IP address.
If the value is empty or absent then the default networking interface is used.
See Also
networkInterfaceA, networkInterfaceB.
String networkInterfaceA

Specifies one or more network interfaces to use for "A" feeds while joining the multicast group; use semi-colon delimited list if more than one.

Note
On Linux the network interface is specified by its name, on Windows - by IP address.
If the value is empty or absent then the Settings::networkInterface value is used.
String networkInterfaceB

Specifies one or more network interfaces to use for "B" feeds while joining the multicast group; use semi-colon delimited list if more than one.

Note
On Linux the network interface is specified by its name, on Windows - by IP address.
If the value is empty or absent then the Settings::networkInterface value is used.
unsigned int outOfOrderPacketMaxInterval

Defines value of threshold used by Handler to differ out-of-order packets from gaps.

Due to unreliable nature of multicast, packets transmitted by MDP may be received in the order different to original. To differ the case when Handler received out-of-order packets from the case when some of packets were completely lost, Handler uses given parameter. It defines size of interval for incoming packets starting from the last received. Packet is considered as out-of-order if its sequence number fits into interval [seqNumberOfLastReceivedPacket, seqNumberOfLastReceivedPacket + outOfOrderPacketsMaxInterval]. In that case Handler waits for other packets to fulfill the incoming sequence. If received packet has greater sequence number than 'seqNumberOfLastReceivedPacket + outOfOrderPacketsMaxInterval', then Handler makes a decision on packets lost and gap is reported.

Note
When out-of-order packet is received, Handler makes a decision on data loss if either waiting time is over or if newly received packet has sequence number greater than 'seqNumberOfLastReceivedPacket + outOfOrderPacketMaxInterval'.
See Also
'lostPacketWaitTime' parameter for more information.
Note
The default value is '10'.
unsigned int packetPoolMaxSize

Limits packet pool size.

To speed-up data processing, Handler may accumulate packets for further reuse during data bursts to avoid slowdowns caused by memory allocations. Given parameter defines maximal number of packets allowed for storing in pool for further reuse.

Note
Default value is '1000'.
unsigned int packetQueueMaxSize

Maximum number of packets to be hold in internal queues used by the Handler while processing incoming market data.

Handler uses internal queues while processes incoming market data. When Handler recovers order books from snapshots, given parameter limits size of internal queue used by the Handler to keep packets coming from incremental feeds. Upon reaching limit, newer packets substitute older ones.

Also, if Handler configured to use buffered packets pulling strategy (

See Also
HandlerSettings::packetsPullingStrategy), given parameter also limits size of queue/buffer used by Handler to store incoming packets received by Handler but not yet processed by main market data processing loop. An important aspect is that single buffer/queue is used to store packets comming from all feeds (A and B) within same multicast group (incremental, snapshot, instrument). New packets are not pushed to queue upon reaching buffer limit in this case.
Note
The default value is 500000.
PacketsPullingStrategy packetsPullingStrategy

Defines market data processing strategy.

Note
Default strategy is PacketsPullingStrategies::Buffered.
bool recoverSecurityDefinitionsOnGap

Option to recover the Security Definition messages each time when the message sequence gap is detected.

During the trading day new instruments can be defined, and these security definitions are sent over the Incremental A and B feeds. Therefore it is possible to miss new intra-day security definition messages, so it could be required to listen to the instrument feed again on a message gap.

On the other hand, this could significantly increase the time of re-synchronization with the market after the detected message gap.

Note
The default value is false.
unsigned int repeatingGroupEntriesMaxCount

Maximum number of repeating group entries.

This setting could be used to detect mismatch between the FAST template that was used for message encoding and the FAST template that is used for message decoding.

Note
The default value is 1000.
String tcpReplayPassword

Password or passphrase to be used in the Logon (35=A) message from customer to CME.

unsigned int tcpReplayReconnectAttempts

Number of attempts to receive missed messages via the TCP Replay Channel.

unsigned int tcpReplayReconnectInterval

Interval between the attempts to receive missed packets via the TCP Replay feed if previous attempt either failed or was rejected.

Interval is measured in milliseconds.

Note
Default value is '500'.
unsigned int tcpReplayRequestTimeframe

Amount of time allocated to process TCP replay request.

Handler interrupts request processing if it doesn't accomplish within given time frame.

Interval is measured in seconds.

Note
Default value is '30'.
String tcpReplayUsername

User identifier or username to be used in the Logon (35=A) message from customer to CME.

unsigned int tcpSocketReceiveBufferSize

Defines size of buffer in bytes for TCP replay receiving socket.

Note
Default value is zero which means system default setting will be used.
ThreadAffinity threadsAffinity

Defines set of CPUs by their indices (starting from zero) allowed for each thread used by the Handler while processing market data to be executed on.

Note
By default set is empty thus allowing threads to be executed on any CPU available in the system.
unsigned int udpSocketBufferSize

Defines size of buffer in bytes for UDP/multicast sockets.

Note
Default value is '4194304' (4 MiB).
bool useIncrementalFeedA

Option to use the Incremental feed "A".

Note
The default value is 'true'.
bool useIncrementalFeedB

Option to use the Incremental feed "B".

Note
The default value is 'true'.
bool useInstrumentReplayFeedA

Option to use the Instrument Replay feed "A".

Note
The default value is 'true'.
Warning
Feed A and Feed B should not be used for arbitration. For this reason it's recommended to use either Feed A or Feed B.
bool useInstrumentReplayFeedB

Option to use the Instrument Replay feed "B".

Note
The default value is 'false'.
Warning
Feed A and Feed B should not be used for arbitration. For this reason it's recommended to use either Feed A or Feed B.
bool useSnapshotFeedA

Option to use the Snapshot feed "A".

Note
The default value is 'true'.
Warning
Feed A and Feed B should not be used for arbitration. For this reason it's recommended to use either Feed A or Feed B.
bool useSnapshotFeedB

Option to use the Snapshot feed "B".

Note
The default value is 'false'.
Warning
Feed A and Feed B should not be used for arbitration. For this reason it's recommended to use either Feed A or Feed B.
bool useTcpReplay

Option to use the TCP Replay feed.

Note
The default value is 'false'.
bool useUniversalTime

Indicates whether local or UTC time is used by the Handler while assigning timestamps to log events and packets received.

Note
Default value is 'false' thus local time is used.