Running the Example FIX Adapter

The FIX adapter example demonstrates how the FIX adapter functions as both an input and an output adapter.

The example is located at: /SybaseC8/enterprise-adapters/fix/examples/EnterpriseAdapters/FixAdapter.

This example makes use of three FIX Adapter instances.

The first FIX adapter instance is configured to use the File Plug-in. It reads FIX messages from a file and publishes them to CEP. In addition, it subscribes to a CEP stream and writes FIX messages received from that stream out to a different file. This instance functions as both an input and an output adapter.

The second FIX adapter instance is configured to use the QuickFIX plug-in, as an initiator. It subscribes to a CEP stream and transmits FIX messages received from that stream over a FIX session. This instance functions as an output adapter.

The third FIX adapter instance is also configured to use the QuickFIX plug-in, but as an acceptor. It receives FIX messages over a FIX session from the second FIX adapter instance and publishes those FIX messages back to CEP. This instance functions as an input adapter.

In order for this example to function properly, the adapters must be started in the order listed.
Note: If there are any problems in running the example, ensure that the SySAM location in the xml files is correct, and that the .../SybaseC8/server/bin directory is in the path.

To run FIX adapter example:

1. Load the FIXAdapter.ccp project onto Sybase CEP Studio.

2. Open 3 CMD windows and start a different instance of the FIX adapter with the following:

CMD 1: c8_fix_adapter --config=sample-prefs-quickfix-acceptor.xml

CMD 2: c8_fix_adapter --config=sample-prefs-quickfix-initiator.xml

CMD 3: c8_fix_adapter --config=sample-prefs-fileplugin.xml

3. Once the FIX adapter instances are working, open stream viewers on the two input and output streams to verify that FIX messages are flowing in and out of the Sybase CEP Server.

The following sections must be altered if they are expected to run on a UNIX-based system:

  • <section name="MappedFileLogger">
  • <preference name="Filename">C:\Program Files\SybaseC8\Server\logs\server.log</preference> to <preference name="Filename">/software/SybaseC8/server/logs/server.log</preference>
  • <section name="MappedFileLogger"> <section name="C8/General"> <preference name="LicenseFolder">C:\Program Files\SybaseC8\Server\SySAM-2_0\licenses</preference> to <preference name="LicenseFolder">/software/SybaseC8/server/SYSAM-2_0/licenses</preference>

The following location contains additional configuration file examples for using QuickFix, database, or file connectivity; however, these are not intended to be running examples: .../SybaseC8/enterprise-adapters/fix/adapters/fix/sample