How to enable throttling in FIX Antenna Java
Configure throttling of incoming messages
Throttling of incoming messages is available since FIX Antenna Java 2.18.1 release.
Throttling of incoming messages allows limiting the amount of received FIX messages within a time interval.
Overview
If the throttling of incoming messages is configured for the session, FIX Antenna Java prevents the counterparty from sending a huge amount of messages (throttleChecking.MST_TYPE.threshold) within the specified time interval (throttleCheckingPeriod). By default, FIX Antenna Java disconnects the FIX session if the amount of received messages of the defined type exceeds the threshold.
Configuration example
Throttling properties must be configured in the fixengine.properties file:
Property | Description |
---|---|
throttleCheckingEnabled | Optional. The property enables FIX messages throttling. If this property is set to 'true' then FIX Engine will count the amount of messages received during throttleCheckingPeriod. If the amount of messages exceeds the value of the throttleChecking.MST_TYPE.threshold property then the session will be disconnected with the 'THROTTLING' reason. Valid values: true, false Default value: false Example: throttleCheckingEnabled = true |
throttleChecking.MST_TYPE.threshold | Optional. The property defines the allowed number of messages of the defined type within the throttleCheckingPeriod. Valid values: The value must be an integer and not negative Default value: -1 (disabled) Example: throttleChecking.MSG_TYPE.threshold = 50 |
throttleCheckingPeriod | Optional. The property defines the throttling time interval in milliseconds. Valid values: The value must be an integer and not negative Default value: 1000 Example: throttleCheckingPeriod = 200 |
// Enables throttling checks mechanism typethrottleCheckingEnabled=true // Defines threshold for New Order messages throttleChecking.D.threshold=5 // Checking timeframe size in milliseconds throttleCheckingPeriod=1000