Apama Capital Markets Foundation Documentation : Algorithmic Trading Accelerator : Developing and Deploying Custom ATA Applications : Adding adapters
Adding adapters
When you are ready to move away from test data to real data, you must access data feeds, and then set up appropriate Apama adapters that will deliver their data to the correlator.
1. Edit the file adapters.xml to define the adapters you want to start and reference their non-custom dependencies. You have access to the properties defined in the APAMA_PROPERTIES files to locate these: ${apama.home} and ${apama.work}.
2. Modify the ant xml script target adapters with the following inner tasks:
a. <start-iaf>
Starts an Adapter (.xml). The attributes you can use for the target are:
*config: the xml adapter configuration file location.
*port: the port to use for the iaf process.
*log: the log file to use.
*loglevel: the iaf log level to use.
*console: when true, launch a separate console to launch the process.
For example:
<start-iaf config=”FIX.xml” loglevel=”ERROR” port=”16778” />
<start-iaf config=”FIX.xml” />
b. <engine-inject>
Injects a MonitorScript file (.mon) located anywhere on disk. This also takes a <filelist> or <fileset> path definition. The attributes that can be used with this target are:
*host: the target correlator host.
*port: the target correlator port.
*file: an optional file to send.
*parallel: when true, all files to inject will be batched into one call.
*failonerror: fails on the first engine send fault.
For example:
<engine-inject file=”my_file.mon” />
c. <engine-send>
Send event files (.evt). also takes a <filelist> or <fileset> path definition. The attributes that can be used with this target are:
*host: the target correlator host.
*port: the target correlator port.
*file: an optional file to send.
*parallel: when true, all files to inject will be batched into one call.
*failonerror: fails on the first engine send fault.
For example:
<engine-inject file=”my_file.evt” />
For more information about specifying ant path types refer to the following resources:
*File lists: http://ant.apache.org/manual/CoreTypes/filelist.html
*File sets: http://ant.apache.org/manual/CoreTypes/fileset.html
The order of your entries defines the order in which they will injected or started. For example:
<target name="adapters" description="Main target for Apama adapters">
<echo message="Starting adapters ..." />
<engine-inject>
<filelist>
<file name=”file1.mon” />
<file name=”file2.mon” />
</filelist>
</engine-inject>

<engine-send>
<filelist>
<file name=”file1.evt” />
<file name=”file2.evt” />
</filelist>
</engine-send>
<start-iaf config=”my_adapter_config.xml” />
<echo message="Adapters done." />
</target>
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback