• Version 1.19.0
Show / Hide Table of Contents

Class SessionSettings

The session-level configuration settings.

Inheritance
object
SessionSettings
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: OnixS.Fix
Assembly: OnixS.Fix.Engine.dll
Syntax
public class SessionSettings

Constructors

SessionSettings()

The constructor.

Declaration
public SessionSettings()

Properties

ConsiderRejectOnResendRequestAsGapFill

By default if the "Session Level Reject" message is received in replay to the "Resend Request" then this is considered as a serious problem and the FIX connection will be closed. This property allows to change this behavior and consider the "Session Level Reject" on the "Resend Request" as the "Sequence Reset Gap Fill" message.

Declaration
public bool ConsiderRejectOnResendRequestAsGapFill { get; set; }
Property Value
Type Description
bool

Consider the "Session Level Reject" on the "Resend Request" as the "Sequence Reset Gap Fill" message

CustomKey

Custom key that can be used to distinguish sessions with the same values of the SenderCompID, TargetCompID and the FIX Protocol version.

Declaration
public string CustomKey { get; set; }
Property Value
Type Description
string

Custom key

CustomStorage

Custom storage.

Declaration
public ISessionStorage CustomStorage { get; set; }
Property Value
Type Description
ISessionStorage

Encryption

Session storage type.

Declaration
public EncryptionMethod Encryption { get; set; }
Property Value
Type Description
EncryptionMethod

HeartbeatResolution

Heartbeat resolution in milliseconds.

Note: This property should be used only to speed up heartbeat-related Unit Tests.

Declaration
public int HeartbeatResolution { get; set; }
Property Value
Type Description
int

Heartbeat resolution in milliseconds

IgnoreLessThanExpectedSequenceNumber

By default if the incoming message has a sequence number less than expected and the PossDupFlag is not set, it indicates a serious error and leads to FIX connection closing. This property allows to change this behavior and consider the sequence number of the incoming message, which less than expected, as an expected one.

Declaration
public bool IgnoreLessThanExpectedSequenceNumber { get; set; }
Property Value
Type Description
bool

InboundMessageLogFilter

Incoming message types to be filtered out from the logs.

Declaration
public string[] InboundMessageLogFilter { get; set; }
Property Value
Type Description
string[]

Incoming message types to be filtered out from the logs.

IncomingMessageGapQueueMaximumSize

Returns maximum size of the incoming message gap queue.

Declaration
public int IncomingMessageGapQueueMaximumSize { get; set; }
Property Value
Type Description
int

maximum size of the incoming message gap queue.

KeepSequenceNumbersBetweenFixConnections

Option to keep sequence numbers after the exchange of Logout (MsgType=5) messages. By default the value is true.

Declaration
public bool KeepSequenceNumbersBetweenFixConnections { get; set; }
Property Value
Type Description
bool

whether to keep sequence numbers after the exchange of Logout (MsgType=5) messages

ListenPort

Port to listen on for incoming connections in Acceptor mode.

Declaration
public int ListenPort { get; set; }
Property Value
Type Description
int

Port to listen on for incoming connections in Acceptor mode

LocalNetworkInterface

The network interface for establishing the TCP connection as an Initiator.

The default value is LocalNetworkInterface.

Declaration
public IPAddress LocalNetworkInterface { get; set; }
Property Value
Type Description
IPAddress

The network interface for establishing the TCP connection as an Initiator

LocalPortRange

The local port range for outgoing connections, the first available port from this range will be used to send and receive data.

By default, a random port will be used.

Declaration
public PortRange LocalPortRange { get; set; }
Property Value
Type Description
PortRange

Local port range.

LogBeforeSending

Option to switch on/off logging of outbound messages before/after sending.

By default, the logging of an outgoing message to the session storage is performed before sending to the wire. This is more reliable because we guarantee that an outgoing message is stored before going to the counterparty and if the application is shut down after sending, for some reasons, the sent message can be resent afterward.

However, this approach adds the logging latency to the FIX Engine sending latency. As a result, it increases the tick-to-trade latency. When the latency is more important, one can switch off the logging before sending, by setting the OnixS::FIX::Session::logBeforeSending option to false. In this case, the logging of outgoing messages to the session storage will be performed after sending to the wire. This way, one can exclude the logging latency from the FIX Engine sending latency and as a result, decrease the tick-to-trade latency.

Declaration
public bool LogBeforeSending { get; set; }
Property Value
Type Description
bool

LogInboundMessages

Store inbound messages in the session storage.

The default value is LogInboundMessages.

Declaration
public bool LogInboundMessages { get; set; }
Property Value
Type Description
bool

Store inbound messages in the session value

LogOutboundMessages

Store outbound messages in the session storage.

/// The default value is LogOutboundMessages.

Declaration
public bool LogOutboundMessages { get; set; }
Property Value
Type Description
bool

Store outbound messages in the session storage

LogResentMessages

Store re-sent messages in the session storage.

/// The default value is LogResentMessages.

Declaration
public bool LogResentMessages { get; set; }
Property Value
Type Description
bool

Store re-sent messages in the session storage

LogonTimeout

Number of seconds to wait for a logon response before disconnecting.

/// The default value is LogonTimeout.

Declaration
public int LogonTimeout { get; set; }
Property Value
Type Description
int

Number of seconds to wait for a logon response before disconnecting

LogoutTimeout

Number of seconds to wait for a logout response before disconnecting.

/// The default value is LogoutTimeout.

Declaration
public int LogoutTimeout { get; set; }
Property Value
Type Description
int

Number of seconds to wait for a logout response before disconnecting

MemoryPoolSettings

Settings of memory pool for the reused inbound message.

Declaration
public MessageMemoryPoolSettings MemoryPoolSettings { get; }
Property Value
Type Description
MessageMemoryPoolSettings

MessageGrouping

Message sending grouping.

The default value is MessageGrouping.

Declaration
public int MessageGrouping { get; set; }
Property Value
Type Description
int

Value 0 means the default grouping - the messages will be sent ASAP and pending messages (if any) will be grouped until reaching the TCP buffer size. Value 1 means the messages will be sent ASAP and will never be grouped. Value 2 (or greater) means the messages will be sent ASAP and pending messages will be grouped maximum by 2 (or greater).

MessageMode

Type of messages to be used in Session's events.

The default value is Message.

Declaration
public MessageMode MessageMode { get; set; }
Property Value
Type Description
MessageMode

Type of messages to be used in Session's events

OutboundMessageLogFilter

Outgoing message types to be filtered out from the logs.

Declaration
public string[] OutboundMessageLogFilter { get; set; }
Property Value
Type Description
string[]

Outgoing message types to be filtered out from the logs.

ProcessDeliverToCompId

Process the DeliverToCompID, tag=128 field.

The default value is ProcessDeliverToCompId.

Declaration
public bool ProcessDeliverToCompId { get; set; }
Property Value
Type Description
bool

Process the DeliverToCompID, tag=128 field

Proxy

Proxy settings.

Declaration
public ProxySettings Proxy { get; }
Property Value
Type Description
ProxySettings

ReasonableTransmissionTime

Reasonable transmission time as % from the heartbeat interval.

The default value is ReasonableTransmissionTime.

Declaration
public int ReasonableTransmissionTime { get; set; }
Property Value
Type Description
int

Reasonable transmission time as % from the heartbeat interval

ReceiveBufferSize

Size of the TCP socket buffer allocated for receiving data, in bytes.

Declaration
public int ReceiveBufferSize { get; set; }
Property Value
Type Description
int

ReceiveSpinningTimeout

The non-blocking receive spinning timeout (in microseconds) before the receiving thread enters into the blocking wait mode.

Should not be greater than 1 sec. (the minimal HeartbeatInterval interval).

The default value is ReceiveSpinningTimeout.

Declaration
public int ReceiveSpinningTimeout { get; set; }
Property Value
Type Description
int

Receive spinning timeout (in microseconds)

ReceivingThreadAffinity

Receiving thread affinity.

Declaration
public int[] ReceivingThreadAffinity { get; set; }
Property Value
Type Description
int[]

ReceivingThreadPriority

Gets or sets the priority of the session receiving thread.

The default value is set by OS.

Declaration
public ThreadPriority ReceivingThreadPriority { get; set; }
Property Value
Type Description
ThreadPriority

The priority of the session receiving thread

ReconnectAttempts

Number of attempts to restore the FIX connection.

The default value is ReconnectAttempts.

Declaration
public int ReconnectAttempts { get; set; }
Property Value
Type Description
int

Number of attempts to restore the FIX connection

ReconnectInterval

Time interval between attempts to restore the FIX connection (in seconds).

The default value is ReconnectInterval.

Declaration
public int ReconnectInterval { get; set; }
Property Value
Type Description
int

Time interval between attempts to restore the FIX connection (in seconds)

ReportNewMessagesWhileWaitingForMissedMessages

When the message gap is detected the "Resend Request" FIX Message is sent and Session state is changed to WaitForRetransmission. By default in this state the incoming new messages (without the PossDupFlag (tag #43) flag) are ignored because we expect them to be re-sent later again with the PossDupFlag flag. This property allows to change this behavior and report the new messages anyway.

Note: In this mode messages could be reported out of the original order: e.g. MsgSeqNum could be: 3 (original), 4 (original), 2 (PossDupFlag='Y'), 3 (PossDupFlag='Y'), 4 (PossDupFlag='Y') and some messages could be received two times: first time without PossDupFlag='Y' and second time - with this flag.

Note: This property is relevant for the default resend behavior only. Therefore, it should not be used when an alternative resend behavior (RequestOnlyMissedMessages) is used.

Default value is false.
Declaration
public bool ReportNewMessagesWhileWaitingForMissedMessages { get; set; }
Property Value
Type Description
bool

Report new messages even when the message gap is detected and the reply on the "Resend Request" message is expected.

RequestOnlyMissedMessages

By default, the "Resend Request" message requests all messages beginning from the first missed one. This property allows to change this behavior and request only missed messages.

The default is false.

Declaration
public bool RequestOnlyMissedMessages { get; set; }
Property Value
Type Description
bool

Request only missed messages

ResendRequestMaximumRange

The maximum number of messages to be requested in one Resend Request(2) message.

The default value is ResendRequestMaximumRange.

Declaration
public int ResendRequestMaximumRange { get; set; }
Property Value
Type Description
int

The maximum number of messages to be requested in one Resend Request (MsgType=2) message or ResendRequestMaximumRangeNoLimit for no limit

ResendTimeout

The timeout during which counterparty should send a reply to the Resend Request (MsgType=2) message. If a counterparty does not reply or reply incorrectly during this timeout, then the Warning is called. By default, the resend request timeout equal to zero, which means an infinite timeout.

Declaration
public TimeSpan ResendTimeout { get; set; }
Property Value
Type Description
TimeSpan

The timeout during which counterparty should send a reply to the Resend Request (MsgType=2) message.

ResendingBatchSize

The maximum number of messages sent in reply to the Resend Request(2) before temporarily releasing the Session's lock.

The default value is ResendingBatchSize.

Declaration
public int ResendingBatchSize { get; set; }
Property Value
Type Description
int

The maximum number of messages sent in reply to the Resend Request(2) before temporarily releasing the Session's lock

ResendingQueueSize

The number of sent messages that are available for resending in reply to the counterparty's "Resend Request" message.

The default value is ResendingQueueSize.

Declaration
public int ResendingQueueSize { get; set; }
Property Value
Type Description
int

The number of sent messages that are available for resending in reply to the counterparty's "Resend Request" message

ResetLocalSequenceNumbersOnLogon

Option to automatically reset the local sequence numbers to 1 during every logon. The default is the opposite value of keepSequenceNumbersBetweenFixConnections session constructor's parameter.

Declaration
public bool ResetLocalSequenceNumbersOnLogon { get; set; }
Property Value
Type Description
bool

whether to automatically reset the local sequence numbers to 1 during every logon

ReuseEventArguments

Reuse event arguments.

Note: If it is turned on, then the client code must copy event arguments for using outside of event handlers.

The default value is false.

Declaration
public bool ReuseEventArguments { get; set; }
Property Value
Type Description
bool

Reuse event arguments

ReuseInboundMessage

Reuse the same Message object for incoming messages.

Note: If it is turned on, then the client code must copy the Message object for using outside of inbound event handlers.

The default value is false.

Declaration
public bool ReuseInboundMessage { get; set; }
Property Value
Type Description
bool

Reuse the same Message object for incoming messages

ScrambledLogonFields

Tags for the Logon(A) message fields to scramble in the session storage for security reasons.

Declaration
public Collection<int> ScrambledLogonFields { get; set; }
Property Value
Type Description
Collection<int>

SendBufferSize

Size of the TCP socket buffer allocated for sending data, in bytes.

Declaration
public int SendBufferSize { get; set; }
Property Value
Type Description
int

SendLogoutOnException

Send the Logout message before dropping the telecommunication link in case of an exception during the processing of an incoming FIX message.

The default value is SendLogoutOnException.

Declaration
public bool SendLogoutOnException { get; set; }
Property Value
Type Description
bool

option to send or not to send

SendQueueMaxSize

Send queue maximum size in bytes.

The default value is SendQueueMaxSize.

Declaration
public int SendQueueMaxSize { get; set; }
Property Value
Type Description
int

Send queue maximum size in bytes

SendResendRequestOnEachMessageGap

By default the "Resend Request" message is sent only once - when the first gap is detected. This property allows to send the "Resend Request" message on each detected message sequence number gap.

Declaration
public bool SendResendRequestOnEachMessageGap { get; set; }
Property Value
Type Description
bool

Send the "Resend Request" message on each detected message sequence number gap

SendSpinningTimeout

The send spinning timeout (in microseconds) of the Send(IMessage) method to wait for the socket sending buffer availability in the spin loop mode before placing the message to the outgoing queue (to be sent later by the sending thread).

Should not be greater than 1 sec (the minimal Heartbeat interval).

The default value is SendSpinningTimeout.

Declaration
public int SendSpinningTimeout { get; set; }
Property Value
Type Description
int

The send spinning timeout (in microseconds)

SenderLocationId

The value of the SenderLocationID (tag 142) field that will be set in all outgoing messages.

Declaration
public string SenderLocationId { get; set; }
Property Value
Type Description
string

SenderLocationID (tag 142) field value.

SenderSubId

The value of the SenderSubID (tag 50) field that will be set in all outgoing messages.

Declaration
public string SenderSubId { get; set; }
Property Value
Type Description
string

SenderSubID (tag 50) field value.

SendingThreadAffinity

Sending thread affinity.

Declaration
public int[] SendingThreadAffinity { get; set; }
Property Value
Type Description
int[]

SendingThreadPriority

Gets or sets the priority of the session sending thread.

The default value is set by OS.

Declaration
public ThreadPriority SendingThreadPriority { get; set; }
Property Value
Type Description
ThreadPriority

The priority of the session sending thread

SendingTimeFormat

Sets the time format of SendingTime of every sent message. By default, the YYYYMMDDHHMMSSMsec format is used.

Declaration
public TimestampFormat SendingTimeFormat { get; set; }
Property Value
Type Description
TimestampFormat

The time format of the SendingTime (52) field

SessionStorageFileFlushPolicy

The File-based Session Storage flush policy. This controls the necessity to flush data on the disk after each update of .summary and .state log files.

The default value is SessionStorageFileFlushPolicy.

Declaration
public FileFlushPolicy SessionStorageFileFlushPolicy { get; set; }
Property Value
Type Description
FileFlushPolicy

The File-based Session Storage flush policy.

SetApplVerId

Option to set the ApplVerID (1128) field in all outgoing application messages when a FIX protocol version FIX 5.0 or above is used.

The default value is SetApplVerId.

Declaration
public bool SetApplVerId { get; set; }
Property Value
Type Description
bool

Set the ApplVerID (1128) field in all outgoing application messages when a FIX protocol version FIX 5.0 or above is used

SetLastMsgSeqNumProcessed

Option to set the LastMsgSeqNumProcessed(369) field in outgoing messages.

The default value is SetLastMsgSeqNumProcessed.

Declaration
public bool SetLastMsgSeqNumProcessed { get; set; }
Property Value
Type Description
bool

Set the LastMsgSeqNumProcessed(369) field in outgoing messages

Ssl

SSL connection settings.

Declaration
public SslSettings Ssl { get; }
Property Value
Type Description
SslSettings

StorageDirectory

Inbound and outbound FIX messages and session's state data are stored in this directory.

The default value is StorageDirectory.

Declaration
public string StorageDirectory { get; set; }
Property Value
Type Description
string

Storage directory

StorageType

Session storage type.

Declaration
public SessionStorageType StorageType { get; set; }
Property Value
Type Description
SessionStorageType

SupportNextExpectedMsgSeqNum

Option to support the NextExpectedMsgSeqNum field (tag 789) in Logon (MsgType=A) messages.

Note: Using of this option should be bilaterally agreed upon between counterparts.

The default value is SupportNextExpectedMsgSeqNum.

Declaration
public bool SupportNextExpectedMsgSeqNum { get; set; }
Property Value
Type Description
bool

Support the NextExpectedMsgSeqNum field (tag 789) in Logon (MsgType=A) messages

TargetLocationId

The value of TargetLocationID (tag 143) field that will be set in all outgoing messages.

Declaration
public string TargetLocationId { get; set; }
Property Value
Type Description
string

TargetLocationID (tag 143) field value.

TargetSubId

The value of the TargetSubID (tag 57) field that will be set in all outgoing messages.

Declaration
public string TargetSubId { get; set; }
Property Value
Type Description
string

TargetSubID (tag 57) field value.

TcpNoDelay

Improve latency at the expense of throughput (disable/enable Nagle's algorithm).

The default value is TcpNoDelay.

Declaration
public bool TcpNoDelay { get; set; }
Property Value
Type Description
bool

Improve latency at the expense of throughput (disable/enable Nagle's algorithm)

UpdateSendingTime

Option to update the SendingTime (52) field in the outgoing message even if it is already set.

The default value is UpdateSendingTime.

Declaration
public bool UpdateSendingTime { get; set; }
Property Value
Type Description
bool

Update the SendingTime (52) field in the outgoing message if it is already set

ValidateCheckSum

Validate the CheckSum (tag 10) field value.

The default value is ValidateCheckSum.

Declaration
public bool ValidateCheckSum { get; set; }
Property Value
Type Description
bool

Validate the CheckSum (tag 10) field value

ValidateDuplicatedFields

Option to validate the presence of fields that appears more than once.

The default value is ValidateDuplicatedFields.

Declaration
public bool ValidateDuplicatedFields { get; set; }
Property Value
Type Description
bool

Validate the presence of fields that appears more than once

ValidateEmptyFieldValues

Option to validate empty message field values.

The default value is ValidateEmptyFieldValues.

Declaration
public bool ValidateEmptyFieldValues { get; set; }
Property Value
Type Description
bool

Validate empty message field values

ValidateFieldValues

Option to validate field values of FIX messages in accordance with the FIX protocol or its FIX Dialect.

The default value is ValidateFieldValues.

Declaration
public bool ValidateFieldValues { get; set; }
Property Value
Type Description
bool

Validate message field values

ValidateRepeatingGroupEntryCount

Option to validate that the declared number of repeating group instances is equal to the actual one.

The default value is ValidateRepeatingGroupEntryCount.

Declaration
public bool ValidateRepeatingGroupEntryCount { get; set; }
Property Value
Type Description
bool

Validate that the declared number of repeating group instances is equal to the actual one

ValidateRepeatingGroupLeadingField

Validate that repeating group instances start with the correct leading fields.

The default value is ValidateRepeatingGroupLeadingField.

Declaration
public bool ValidateRepeatingGroupLeadingField { get; set; }
Property Value
Type Description
bool

Validate that repeating group instances start with the correct leading fields.

ValidateRequiredFields

Validate the presence of required fields.

The default value is ValidateRequiredFields.

Declaration
public bool ValidateRequiredFields { get; set; }
Property Value
Type Description
bool

Validate the presence of required fields

ValidateSequenceNumbers

Returns whether to validate incoming message sequence numbers. Default value is true.

Declaration
public bool ValidateSequenceNumbers { get; set; }
Property Value
Type Description
bool

whether to validate incoming message sequence numbers

ValidateUnknownFields

Validate that there are no unknown message fields.

The default value is ValidateUnknownFields.

Declaration
public bool ValidateUnknownFields { get; set; }
Property Value
Type Description
bool

Validate that there are no unknown message fields.

ValidateUnknownMessages

Validate that there are no unknown messages received.

The default value is ValidateUnknownMessages.

Declaration
public bool ValidateUnknownMessages { get; set; }
Property Value
Type Description
bool

Validate that there are no unknown messages received.

Methods

CopyTo(SessionSettings)

Copies the properties of this instance into the specified destination SessionSettings object.

Declaration
public void CopyTo(SessionSettings other)
Parameters
Type Name Description
SessionSettings other

An SessionSettings object to which the properties of this instance are copied.

In this article
Back to top Copyright © Onix Solutions.
Generated by DocFX