Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Order Management : Risk Firewall : Configuring risk firewall instances : Descriptions of risk firewall configuration parameters
Descriptions of risk firewall configuration parameters
Constant values defined in com.apama.firewall.Consts define the names of the configuration parameters that control risk firewall behavior. These configuration parameters are described here in logical functional groups. For alphabetical reference information, see the ApamaDoc for com.apama.firewall.Consts. See also Setting risk firewall parameters and Default settings for risk firewall configuration parameters.
The following sections describe risk firewall parameters.
Risk firewall factory and instance parameters
CONFIG_LOCKED_ON_CREATE
*This constant value defines the name of the configuration parameter that indicates whether a risk firewall is created in a locked state.
*The default is that a risk firewall is created in a locked state. That is, an application must explicitly unlock a risk firewall. See Unlocking and locking risk firewalls.
*To change the setting of this parameter, use the CONFIG_LOCKED_ON_CREATE key and set it to the boolean value you need.
CONFIG_TIMEOUT_DURATION
*This constant value defines the name of the configuration parameter that indicates the timeout duration for event communication.
*The default is 5 seconds. This setting is used when
*Connecting to a risk firewall
*Registering a rule class
*Waiting for queries related to a single order to all be processed
*See also CONFIG_SOFT_REJECT_DURATION and CONFIG_BUSTED_FILL_DURATION.
*To change the setting of this parameter, use the CONFIG_TIMEOUT_DURATION key and set it to the float value you need.
CONFIG_ENABLE_PERSISTENCE
*This constant value defines the name of the configuration parameter that indicates whether persistence is enabled for the risk firewall. Note that risk firewall persistence is separate from correlator persistence. When risk firewall persistence is enabled then rule class instances are reloaded upon correlator re-start regardless of whether persistence is enabled for the correlator.
*The default is that persistence is enabled.
*This parameter needs to be set using the Service Framework as it is the same for all firewalls created. To change it, you must send in a ServiceParameters event during startup:
com.apama.service.framework.ServiceParameters("RiskFirewall", "RiskFirewall", com.apama.firewall.Consts.CONFIG_ENABLE_PERSISTENCE, "true")
CONFIGSTORE_PATH_DEFAULT
*This constant value defines the default file and path for persisting risk firewall data in configuration store tables.
*The default is "RiskFirewall.sqlite".
*To change the setting of this parameter, use the CONFIGSTORE_PATH_KEY parameter.
CONFIGSTORE_PATH_KEY
*This constant value defines the configuration key value for setting the risk firewall default file and path for its configuration store tables. Use this parameter when you need to override the default storage location used by the risk firewall. If you change the value of this parameter you must have read/write access to the location you specify.
*The default is "ConfigStorePath"
*This parameter needs to be set using the Service Framework as it is the same for all firewalls created. To change it, you must send in a ServiceParameters event during startup:
com.apama.service.framework.ServiceParameters("RiskFirewall", "RiskFirewall", com.apama.firewall.Consts.CONFIGSTORE_PATH_KEY, "/path/to/configstore")
RISK_FIREWALL_SERVICE_TYPE
*This constant value defines the name of the risk firewall service that is registered with the CMF Service Framework.
*The default is "RiskFirewall".
*You cannot modify the value of this parameter. However, you can use this parameter to query the CMF Service Framework directly for all services of this type. Also, the value of this parameter is the prefix of the name of the Apama MemoryStore table that is used to store information about the rule class instances in the risk firewall.
Order operation cache parameters
If you want to set a value for one of these parameters, you must do so in a risk firewall factory before you create a risk firewall. After you create a risk firewall, you cannot change the value of any of these parameters for that risk firewall instance.
ORDER_OPERATION_CACHE_TIMEOUT
*This constant value defines the name of the configuration parameter that specifies the timeout duration for automatic purging of rows in the order operation cache. The value of this parameter specifies a number of seconds. It indicates how long a row is stored before it is eligible for automatic purging the next time that automatic purging is done.
*The default is 0, which means that rows are not automatically purged.
*Use this parameter with the ORDER_OPERATION_CACHE_PURGE_INTERVAL and ORDER_OPERATION_CACHE_PURGE_TIME parameters.
ORDER_OPERATION_CACHE_PURGE_INTERVAL
*This constant value defines the name of the configuration parameter that specifies the purging interval, in seconds, for automatic purging of rows in the order operation cache.
*The default is 0, which means that rows are not automatically purged.
*For example, if you set this parameter to 60 then the automatic purging algorithm runs every 60 seconds.
ORDER_OPERATION_CACHE_PURGE_TIME
*This constant value defines the name of the configuration parameter that specifies the purge time for the order operation cache.
*The format for the purge time is hh:mm:ss. The default is that no purge time is set.
*Use this parameter to set a single time of day to purge the cache.
ORDER_OPERATION_CACHE_MAX_ROWS
*This constant value defines the name of the configuration parameter that specifies the maximum number of rows that can be automatically purged.
*The default is 0, which means that rows are not automatically purged.
ORDER_OPERATION_CACHE_PATH_DEFAULT
*This constant value defines the name of the configuration parameter that specifies the default file and path for the tables in the order operation store.
*The default is OrderOperationCache.sqlite.
ORDER_OPERATION_CACHE_PATH_KEY
*This constant value defines the name of the configuration parameter that specifies the configuration key value for setting the risk firewall default file and path for the tables in the order operation store.
*The default is OrderOperationCacheStorePath.
*Use this parameter to override the default storage location used by risk firewalls.
Rule class parameters
RULE_CLASS_PRIORITY_HIGH
*This constant value defines the high priority value for a registered rule class.
*The default is 0.
*A rule class with this priority is evaluated first.
RULE_CLASS_PRIORITY_LOW
*This constant value defines the low priority value for a registered rule class.
*The default is 100.
*A rule class with this priority is evaluated last unless you have defined your own priority values that are greater than this value.
RULE_CLASS_PRIORITY_MEDIUM
*This constant defines the medium priority value for a registered rule class.
*The default is 50.
*This is the default priority assigned to each rule class upon registration.
RULE_CLASS_STATE_PARAM_INSTANCE_COUNT
*This constant value defines the name of the parameter that contains the number of rule class instances that have been added for a particular rule class. The risk firewall provides this count when it returns information for registered rule classes as a result of a call to RiskFirewall.getAllRuleClassInstanceInfo() or RiskFirewall.getRuleClassInfo().
*There is no default.
CONFIG_RECOVERED_RULE_INSTANCE_ID
*When a rule class instance is recovered after correlator re-start, the risk firewall adds this configuration key to the configuration parameters associated with the rule class instance. This parameter defines the rule class instance Id that was used previously in the correlator. This parameter can be useful, for example, if you have a custom rule class implementation that performs recovery of custom state information from persistence.
*The default is "RECOVERED_RULE_INSTANCE_ID".
Rule class instance parameters
SLICE_EXCHANGEID
*This constant value defines the name of the rule class instance configuration parameter that can specify a list of exchange Ids. If this parameter has a value, then for this rule class instance to evaluate an incoming order, the incoming order must have one of the specified exchange Ids.
*The default is that this parameter has no value. If you specify a value for this parameter it must be a sequence of strings.
*The default is that the exchange Id slice parameter is a wildcard, that is, it matches all exchange Ids. When this parameter has a value the rule class instance is evaluated for any orders that have one of the specified exchange Ids.
SLICE_EXTRAPARAM
*This constant value defines the name of the rule class instance configuration parameter that can specify a list of extra parameters. If this parameter has a value, then for this rule class instance to evaluate an incoming order, the incoming order must have a field that matches one of the keys in the specified dictionary of extra parameters, and the value of the field in the incoming event must be one of the values in the sequence for that key in the specified dictionary.
*The default is that this parameter has no value. If you assign a value to this parameter, it must be dictionary<string, sequence<string> >. This provides a set of extra parameter keys, and a set of possible values for each key.
*The default is that the extra parameters slice parameter is a wildcard, that is, it matches all extra parameters. When this parameter has a value the rule class instance is evaluated for any orders that have one of the specified extra parameters.
SLICE_MARKETID
*This constant value defines the name of the rule class instance configuration parameter that can specify a list of market Ids. If this parameter has a value, then for this rule class instance to evaluate an incoming order, the incoming order must have one of the specified market Ids.
*The default is that this parameter has no value. If you specify a value for this parameter it must be a sequence of strings.
*The default is that the market Id slice parameter is a wildcard, that is, it matches all market Ids. When this parameter has a value the rule class instance is evaluated for any orders that have one of the specified market Ids.
SLICE_SERVICEID
*This constant value defines the name of the rule class instance configuration parameter that can specify a list of service Ids. If this parameter has a value, then for this rule class instance to evaluate an incoming order, the incoming order must have one of the specified service Ids.
*The default is that this parameter has no value. If you specify a value for this parameter it must be a sequence of strings.
*The default is that the service Id slice parameter is a wildcard, that is, it matches all service Ids. When this parameter has a value the rule class instance is evaluated for any orders that have one of the specified service Ids.
SLICE_SYMBOL
*This constant value defines the name of the rule class instance configuration parameter that can specify a list of symbols. If this parameter has a value, then for this rule class instance to evaluate an incoming order, the incoming order must have one of the specified symbols.
*The default is that this parameter has no value. If you specify a value for this parameter it must be a sequence of strings.
*The default is that the symbol slice parameter is a wildcard, that is, it matches all symbols. When this parameter has a value the rule class instance is evaluated for any orders that have one of the specified symbols.
SLICE_TRADERID
*This constant value defines the name of the rule class instance configuration parameter that can specify a list of trader Ids. If this parameter has a value, then for this rule class instance to evaluate an incoming order, the incoming order must have one of the specified trader Ids.
*The default is that this parameter has no value. If you specify a value for this parameter it must be a sequence of strings.
*The default is that the trader Id slice parameter is a wildcard, that is, it matches all trader Ids. When this parameter has a value the rule class instance is evaluated for any orders that have one of the specified trader Ids.
Risk firewall query parameters
CONFIG_ADD_QUERY_RESPONSE_FAIL
*This constant value defines the name of the configuration parameter that indicates whether failure responses from risk firewall query requests should be added to the query response object.
*The default is that the failure responses are added.
*To change the setting of this parameter, use the CONFIG_ADD_QUERY_RESPONSE_FAIL key and set it to the boolean value you need.
CONFIG_ADD_QUERY_RESPONSE_PASS
*This constant value defines the name of the configuration parameter that indicates whether pass responses from risk firewall query requests should be added to the query response object.
*The default is that the pass responses are not added
*To change the setting of this parameter, use the CONFIG_ADD_QUERY_RESPONSE_PASS key and set it to the boolean value you need.
CONFIG_ADD_QUERY_RESPONSE_WARN
*This constant value defines the name of the configuration parameter that indicates whether warning responses from risk firewall query requests should be added to the query response object.
*The default is that the failure responses are added
*To change the setting of this parameter, use the CONFIG_ADD_QUERY_RESPONSE_WARN key and set it to the boolean value you need.
Order Management Parameters
CONFIG_BUSTED_FILL_DURATION
*This constant value defines the name of the configuration parameter that indicates the maximum duration that the risk firewall waits for updates to orders after they have been completed. If an order update arrives within this duration the risk firewall forwards it to the order sender that originated the order and the application determines what happens.
*The default is 5 seconds.
*To change the setting of this parameter, use the CONFIG_BUSTED_FILL_DURATION key and set it to the float value you need.
CONFIG_CHANGE_LATENCY_TIMESTAMPID_BASE
*This string constant defines the name of the configuration parameter used to alter the base number for the latency timestamp identifiers for inbound and outbound order management events. This may be useful if, for example, more than one risk firewall is used in the order management chain.
*The default is "CHANGE_INBOUND_NEWORDER_TIMESTAMPID".
CONFIG_DEFAULT_LATENCY_TIMESTAMPID_BASE
*This integer constant defines the default identifier that all inbound/outbound timestamps for the risk firewall will use as a base identifier. All risk firewall timestamp identifiers are offset from this base identifier.
*The default is 7000.
*Timestamp identifiers are used as dictionary keys. If you have multiple risk firewalls in the chain of components that an order must pass through, the timestamp identifier would be overwritten by successive risk firewalls. In that situation, you can change the value of the timestamp identifier base so that each risk firewall uses a different base value. You might also want to change the value of the base identifier if you have another component that is adding timestamps with an identifier key of 7000. For more information about timestamp identifiers, see Measuring order handling performance in the risk firewall.
CONFIG_INBOUND_AMENDORDER_TIMESTAMPID_OFFSET
*This constant defines the default identifier for inbound AmendOrder timestamps.
*The default is 2.
CONFIG_INBOUND_CANCELORDER_TIMESTAMPID_OFFSET
*This constant defines the default identifier for inbound CancelOrder timestamps.
*The default is 4.
CONFIG_INBOUND_NEWORDER_TIMESTAMPID_OFFSET
*This constant defines the default identifier for inbound NewOrder timestamps.
*The default is 0.
CONFIG_INBOUND_ORDERUPDATE_TIMESTAMPID_OFFSET
*This constant defines the default identifier for inbound OrderUpdate timestamps.
*The default is 6.
CONFIG_OUTBOUND_AMENDORDER_TIMESTAMPID_OFFSET
*This constant defines the default identifier for outbound AmendOrder timestamps.
*The default is 3.
CONFIG_OUTBOUND_CANCELORDER_TIMESTAMPID_OFFSET
*This constant defines the default identifier for outbound CancelOrder timestamps.
*The default is 5.
CONFIG_OUTBOUND_NEWORDER_TIMESTAMPID_OFFSET
*This constant defines the default identifier for outbound NewOrder timestamps.
*The default is 1.
CONFIG_OUTBOUND_ORDERUPDATE_TIMESTAMPID_OFFSET
*This constant defines the default identifier for outbound OrderUpdate timestamps.
*The default is 7.
CONFIG_LOG_AMEND_CANCEL_LATENCY_TIMESTAMPS
*This constant value defines the name of the configuration parameter that indicates whether to log latency timestamps for performance measurement for AmendOrder and CancelOrder requests passed into the risk firewall.
*The default is that latency timestamps for AmendOrder and CancelOrder requests are logged.
*To disable logging of AmendOrder and CancelOrder requests, use the CONFIG_LOG_AMEND_CANCEL_LATENCY_TIMESTAMPS key and set it to the boolean value you need.
CONFIG_LOG_INBOUND_LATENCY_TIMESTAMPS
*This constant value defines the name of the configuration parameter that indicates whether to log latency timestamps for performance measurement for order management requests passed into the risk firewall.
*The default is that latency timestamps for inbound order management requests are not logged.
*To enable logging of inbound order management requests, use the CONFIG_LOG_INBOUND_LATENCY_TIMESTAMPS configuration key and set it to the boolean value you need.
CONFIG_LOG_OUTBOUND_LATENCY_TIMESTAMPS
*This constant value defines the name of the configuration parameter that indicates whether to log latency timestamps for performance measurement for requests passed out of the risk firewall.
*The default is that latency timestamps for outbound order management requests are not logged.
*To enable logging of outbound order management requests, use the CONFIG_LOG_OUTBOUND_LATENCY_TIMESTAMPS configuration key and set it to the boolean value you need.
Order Rejection Parameters
CONFIG_FAST_FAIL_MODE
*This constant value defines the name of the configuration parameter that indicates whether the risk firewall runs in fast fail mode. Fast fail mode rejects an order upon the first failure response to a rule query. The combined query response contains only the single failure.
*The default is that fast fail mode is enabled.
*To disable fast fail mode, use the CONFIG_FAST_FAIL_MODE key and set it to the boolean value you need. If you disable fast fail mode all query failure/warning responses are collated into the combined query response.
CONFIG_REJECT_BY_DEFAULT
*This constant value defines the name of the configuration parameter that indicates whether the risk firewall rejects an order that does not match any slice criteria defined for any rule class instance that has been added to the risk firewall.
*The default is that reject by default is enabled.
*To disable this rejection mode , use the CONFIG_REJECT_BY_DEFAULT key and set it to the boolean value you need. If you disable reject by default mode then an order that does not match any slice criteria defined in the risk firewall is automatically approved.
CONFIG_SOFT_REJECT_DURATION
*This constant value defines the name of the configuration parameter that indicates the maximum period the the risk firewall pends orders while waiting for a rejection override when running in soft rejection mode.
*The default is 60 seconds.
*To change the setting of this configuration parameter, use the CONFIG_SOFT_REJECT_DURATION key and set it to the float value you need.
CONFIG_REJECTION_MODE
*This constant value defines the name of the configuration parameter that indicates the rejection mode being used by the risk firewall. For details about each rejection mode, see Configuring risk firewall behavior for rejected orders.
*The default is that the risk firewall uses hard rejection mode.
*To change the setting of this configuration parameter, set CONFIG_REJECTION_MODE to one of the following configuration parameters.
*CONFIG_REJECTION_MODE_HARD
*CONFIG_REJECTION_MODE_MONITOR
*CONFIG_REJECTION_MODE_SOFT
Legacy risk firewall parameters
CONFIG_ENABLE_LEGACY_MODE
*This constant value defines the name of the configuration parameter that indicates whether the risk firewall is operating in legacy mode. In legacy mode, the risk firewall listens for and routes approved OMS events as described here: Configuring a risk firewall to support the legacy order event interface firewall.
*The default is that this parameter is disabled.
*To enable legacy mode, set CONFIG_ENABLE_LEGACY_MODE, which is a boolean, to true.
LEGACY_FIREWALL_SERVICEID
*This constant value defines the service Id that was used to send OMS events through the legacy risk firewall. This is defined for use by the risk firewall when used in legacy mode.
*The value of this constant is "__ObjectionBasedFirewallControllerExternal".
CONFIG_TARGET_SERVICE_EXTRA_PARAM
*This constant value defines the key name in the OMS event's extra parameters field whose value indicates the service Id to send OMS events to. A risk firewall that is operating in legacy mode uses this setting.
*The default is "Firewall.TargetService".
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback