Difference between revisions of "Feed Handlers"

From 3forge Documentation
Jump to navigation Jump to search
m (Mir moved page Datasource Adapters And Feed Handler Guides to Feed Handlers without leaving a redirect)
m
Line 1: Line 1:
 +
=KDB Feed Handler=
  
 +
==Prerequisites==
 +
Be sure that KDB is running before adding as a data source. Fully tested versions include 3.x
 +
 +
==Configuring KX live streaming inside AMI Relays==
 +
KX live streaming integrates with kdb+tick via the AMI Feed handler mechanism. AMI can be
 +
configured to connect and subscribe to KX ticker plants. This enables AMI to receive all real-time
 +
updates from the ticker plant. Optionally, AMI can also be configured to recover from ticker plant
 +
log files before consuming real time updates.
 +
 +
===Ami Relay Property Settings for KX feed handler===
 +
The following properties should be set in ami relays' '''config/local.properties'''
 +
 +
As with all feed handlers, add one uniquely named entry for each KX feed handler to the
 +
'''ami.relay.fh.active''' property. Be sure to include the default ssocket,cfg and cmd feed handlers. For example if you have only one kx feed handler:
 +
 +
*<span style="font-family: courier;">ami.relay.fh.active</span>,=cfg,cmd,kx1
 +
 +
Then, for each KX feed handler, include the following properties. NOTE: Be sure to include the
 +
proper feed handler name in the property name:
 +
 +
*<span style="font-family: courier;">ami.relay.fh.kx1.start</span>='''true''' #must be set to true, otherwise it will be disabled
 +
*<span style="font-family: courier;">ami.relay.fh.kx1.class</span>='''com.f1.ami.relay.fh.AmiKxFH''' #required, must be exact
 +
*<span style="font-family: courier;">ami.relay.fh.kx1.props.kxUrl</span>='''hostname:port''' #location of the ticker plant
 +
*<span style="font-family: courier;">ami.relay.fh.kx1.props.kxUsername</span>='''username'''  #optional
 +
*<span style="font-family: courier;">ami.relay.fh.kx1.props.kxPassword</span>='''password'''  #optional
 +
*<span style="font-family: courier;">ami.relay.fh.kx1.props.amiId</span>='''KX_APP_ID''' #indicates what the application id of  messages coming from this ticker plant will be mapped to (See AMI Backend API Manual for  explanation on application ids)
 +
*<span style="font-family: courier;">ami.relay.fh.kx1.props.replayUrl</span>='''hostname:port''' #optional, only if recovery is  required. See ''KDB Ticker plant Recovery steps'' below on how to configure and start kdb  replay process.
 +
*<span style="font-family: courier;">ami.relay.fh.kx1.props.tableKeyMap</span>='''table1=col1,col2,coln|table2=col1, col2''' #Format is pipe delimited list of tables, with columns delimited by comma. Only the data  included in this property will be consumed by AMI.
 +
*<span style="font-family: courier;">ami.relay.fh.kx1.props. subscribeQuery</span>='''subscription_kx_query''' #optional
 +
**Default is: <span style="font-family: courier;">.u.sub[`;`]; (.u `i`L;.u.t!{0!meta x} each .u.t)</span>

Revision as of 22:51, 5 January 2023

KDB Feed Handler

Prerequisites

Be sure that KDB is running before adding as a data source. Fully tested versions include 3.x

Configuring KX live streaming inside AMI Relays

KX live streaming integrates with kdb+tick via the AMI Feed handler mechanism. AMI can be configured to connect and subscribe to KX ticker plants. This enables AMI to receive all real-time updates from the ticker plant. Optionally, AMI can also be configured to recover from ticker plant log files before consuming real time updates.

Ami Relay Property Settings for KX feed handler

The following properties should be set in ami relays' config/local.properties

As with all feed handlers, add one uniquely named entry for each KX feed handler to the ami.relay.fh.active property. Be sure to include the default ssocket,cfg and cmd feed handlers. For example if you have only one kx feed handler:

  • ami.relay.fh.active,=cfg,cmd,kx1

Then, for each KX feed handler, include the following properties. NOTE: Be sure to include the proper feed handler name in the property name:

  • ami.relay.fh.kx1.start=true #must be set to true, otherwise it will be disabled
  • ami.relay.fh.kx1.class=com.f1.ami.relay.fh.AmiKxFH #required, must be exact
  • ami.relay.fh.kx1.props.kxUrl=hostname:port #location of the ticker plant
  • ami.relay.fh.kx1.props.kxUsername=username #optional
  • ami.relay.fh.kx1.props.kxPassword=password #optional
  • ami.relay.fh.kx1.props.amiId=KX_APP_ID #indicates what the application id of messages coming from this ticker plant will be mapped to (See AMI Backend API Manual for explanation on application ids)
  • ami.relay.fh.kx1.props.replayUrl=hostname:port #optional, only if recovery is required. See KDB Ticker plant Recovery steps below on how to configure and start kdb replay process.
  • ami.relay.fh.kx1.props.tableKeyMap=table1=col1,col2,coln|table2=col1, col2 #Format is pipe delimited list of tables, with columns delimited by comma. Only the data included in this property will be consumed by AMI.
  • ami.relay.fh.kx1.props. subscribeQuery=subscription_kx_query #optional
    • Default is: .u.sub[`;`]; (.u `i`L;.u.t!{0!meta x} each .u.t)