Contents
The StreamBase Exegy adapter relies on version 3.5.0 or later of the JAR file that implements the Exegy Client API, XCAPI.jar
. This file is supplied as part of your Exegy installation and is not shipped with StreamBase. If you get an error message
whose text refers to NoClassDefFoundError: com/exegy/xcapi/XCException
, make sure this JAR file is locatable by the adapter on the path specified in the CLASSPATH environment variable.
The StreamBase Exegy adapter also relies on version 3.5.0 or later of the native library that implements the Exegy Client
API, libjnixcapi64.so
on Linux and jnixcapi64.DLL
on Windows. This file is supplied as part of your Exegy installation and is not shipped with StreamBase. If you get an error
message whose text refers to Failed to load Java XCAPI library (jnixcapi64)
, make sure this file is locatable by the adapter on the path specified in the LD_LIBRARY_PATH environment variable on Linux
or in the PATH environment variable on Windows.
The Exegy API implementation described in this section is a product of a third party, and its specifications and file names are subject to change by Exegy. See your Exegy documentation for the latest information.
In StreamBase Studio, import this sample with the following steps:
-
From the top-level menu, click
> . -
Enter
exe
to narrow the list of options. -
Select Exegy input adapter from the StreamBase Market Data adapters category.
-
Click
.
StreamBase Studio creates a project for this sample.
-
In the Project Explorer view, open the sample you just loaded.
If you see red marks on a project folder, wait a moment for the project to load its features.
If the red marks do not resolve themselves after a minute, select the project, right-click, and select
> from the context menu. -
Open the
src/main/eventflow/
folder.packageName
-
Open the
ExegySample.sbapp
file and select the adapter icon to open the Properties view for the adapter. -
Select the Connection Properties tab and enter values for Exegy Server Host, Login Username, and Login Password.
-
Click the Run button. This opens the SB Test/Debug perspective and starts the module.
-
In the Test/Debug Perspective, open the Output Streams view. Observe a tuple on the
Dictionary
stream containing a list of tuples, one for each field in the Exegy dictionary. -
In the Manual Input view, select the
Admin
input stream, enterconnect
in thecommand
field, and click . An additional tuple appears in the Output Streams view from theStatus
stream indicating the adapter has connected to the Exegy server. -
In the Manual Input view, select the
Subscribe
input stream, entersubscribe
,US:N:IBM
,level_one
, andequity
in thecommand
,symbol
,subscriptionType
, andcontainerType
fields, respectively, then optionally add values for PassThru and maxQuoteRate and click . A tuple appears in the Output Streams view from theStatus
stream indicating the subscription request has been processed, followed by a series of refresh (XC_MESSAGE_TYPE=0), quote (2), and trade (3) tuples on theEquities
stream. -
In the Manual Input view, again in the
Subscribe
input stream, enterunsubscribe
in thecommand
field, leave the remaining fields unchanged, and click . A tuple appears in the Output Streams view from theStatus
stream indicating the unsubscribe request has been processed, and the flow of tuples from theEquities
stream stops. -
When done, press F9 or click the Terminate EventFlow Fragment button.
When you load the sample into StreamBase Studio, Studio copies the sample project's files to your Studio workspace, which is normally part of your home directory, with full access rights.
Important
Load this sample in StreamBase Studio, and thereafter use the Studio workspace copy of the sample to run and test it, even when running from the command prompt.
Using the workspace copy of the sample avoids permission problems. The default workspace location for this sample is:
studio-workspace
/sample_exegy
See Default Installation Directories for the default location of studio-workspace
on your system.