Contents
This adapter is part of the TIBCO StreamBase CEP Connectivity Package.
The TIBCO StreamBase® Monitoring Adapter for Exegy allows a StreamBase application to monitor the feeds and lines of an Exegy Ticker Plant. The adapter is currently supported on 64-bit Linux only.
The adapter is embedded in the StreamBase application and has one input and two output ports.
The adapter can be configured to connect to the Exegy Ticker Plant when it starts or later, in response to a connect
tuple on its Admin
input port. Section Input Ports describes the adapter's input port in more detail.
The adapter's FeedOut
and LinesOut
output ports emit tuples on receipt of feed and line events, respectively, from the Exegy Client API. The schemas of the
output ports are determined by the adapter, as described in Output Ports.
The adapter is configured through properties set in the adapter's Properties view in StreamBase Studio.
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.
Property | Description |
---|---|
Exegy Server Host | The host name or IP address of the Exegy Ticker Plant. |
Login Username | The username used in connecting to the Exegy Ticker Plant. |
Login Password | The password used in connecting to the Exegy Ticker Plant. |
Connect on Startup | If enabled (the default), the adapter connects to the Exegy Ticker Plant when it starts. If the adapter is configured to not
connect on startup, a connect tuple can be enqueued to the adapter's Admin port to initiate connection to the Exegy Ticker Plant.
|
Log Level | Controls the level of verbosity the adapter uses to send notifications to the console. This setting can be higher than the containing application's log level. If set lower, the system log level is used. Available values, in increasing order of verbosity, are: OFF, ERROR, WARN, INFO, DEBUG, TRACE, and ALL. |
As shown in the diagram below (depicting the adapter's sample application), the Exegy Monitoring adapter, when configured with all ports enabled, has one input port and two output ports to communicate with the surrounding application.
Note
In this adapter's sample application, the adapter's input and output ports are connected directly to externally-visible input and output streams. However, in more complex applications these ports will typically be connected to internal StreamBase operators.
The Exegy Monitoring Adapter's ports are used as follows:
-
Admin: This input port receives tuples used to connect to, and disconnect from, the Exegy Ticker Plant. The Admin port has the following schema:
-
command, string: Contains the administrative command to execute:
-
connect — connect to the Exegy Ticker Plant.
-
disconnect — disconnect from the Exegy Ticker Plant.
-
-
-
FeedOut: The adapter emits tuples on this port on receipt of feed events from the Exegy Client API. The FeedOut port has the following schema:
-
FEED_IDENTIFIER, string: The name of the feed.
-
EXCHANGE, string: The exchange code.
-
COUNTRY, string: The country code.
-
MARKET_STATUS, string: The market status and substatus.
-
USERBBO_MEMBER, boolean: True if the exchange is included in user-defined BBO and false otherwise.
-
EXCHANGE_HITIME, timestamp: The Exchange timestamp indicating when the event left the exchange. (The timestamp is referenced to the exchange's local time zone.)
-
-
LinesOut: The adapter emits tuples on this port on receipt of feed events from the Exegy Client API. The LinesOut port has the following schema:
-
TIMESPAN, long: Sampling period, in nanoseconds, for all rate fields.
-
PEAK_QUOTE_HIRATE, long: Peak quote high rate (in quotes per second) during the last reporting period.
-
PEAK_TRADE_HIRATE, long: Peak trade high rate (in trades per second) during the last reporting period.
-
PEAK_QUOTE_BURSTRATE, long: Peak quote burst rate (in trades per second) during the last reporting period.
-
PEAK_TRADE_BURSTRATE, long: Peak trade burst rate (in trades per second) during the last reporting period.
-
LINE_COUNT, int: Number of configured lines on the Exegy Ticker Plant.
-
LINE_STATS, list<tuple>: A list of line statistics tuples, one tuple per line. Each line tuple has the following schema:
-
LINE_NAME, string: Line name.
-
LINE_IDENTIFIER, string: Line identifier.
-
TIMESTAMP, timestamp: Time at which statistics were computed.
-
ON_SCHEDULE, boolean: True if the line is on schedule and false otherwise.
-
TEST, boolean: True if the line is in test mode and false otherwise.
-
CONNECTED, boolean: True if the line is connected and false otherwise.
-
LOGGED_IN, boolean: True if the line is logged in and false otherwise.
-
ALARM, boolean: True of the line is in alarm state and false otherwise.
-
ABORTED, boolean: True if the line is aborted and false otherwise.
-
PENDING_DOWN, boolean: True if the line is shutting down and false otherwise.
-
LINE_STATE, string: Line state:
-
UP
-
DOWN
-
PAUSED
-
-
UDP_SOCKET_COUNT, long: Number of UDP sockets configured for this line.
-
TCP_SOCKET_COUNT, long: Number of TCP sockets configured for this line.
-
LAST_GAP_TIME, timestamp: Time of last gap.
-
LINE_SKEW, long: Time skew (maximum time difference) between the RECEIVE_HITIMES (Exegy Ticker Plant timestamps) for the two redundant data streams received from the exchange or data provider for this line.
-
EXCHANGE_SKEW, long: Time skew (maximum time difference) between the EXCHANGE_HITIME (exchange timestamp) and RECEIVE_HITIME (Exegy Ticker Plant timestamp) for all events received during the last update period.
-
MESSAGE_COUNT, long: Total post-arbitration messages received since the last line reset.
-
BYTE_COUNT, long: Total post-arbitration bytes received since the last line reset.
-
PACKET_COUNT, long: Total post-arbitration packets received since the last line reset.
-
QUOTE_COUNT, long: Total post-arbitration quotes received since the last line reset.
-
TRADE_COUNT, long: Total post-arbitration trades received since the last line reset.
-
PEAK_MESSAGE_RATE, long: Peak message rate (in messages per second) during the last reporting period, calculated using the TIMESPAN value as the sampling interval. The reporting period is the configured update interval (generally one second).
-
PEAK_BYTE_RATE, long: Peak byte rate during the last reporting period.
-
PEAK_PACKET_RATE, long: Peak packet rate (packets per second) during the last reporting period.
-
PEAK_QUOTE_RATE, long: Peak quote rate (quotes per second) during the last reporting period.
-
PEAK_TRADE_RATE, long: Peak trade high rate (in trades per second) during the last reporting period.
-
PEAK_MESSAGE_HIRATE, long: Peak message high rate (in quotes per second) during the last reporting period.
-
PEAK_BYTE_HIRATE, long: Peak byte high rate (in quotes per second) during the last reporting period.
-
PEAK_PACKET_HIRATE, long: Peak packet high rate (in quotes per second) during the last reporting period.
-
PEAK_MESSAGE_BURSTRATE, long: Peak message burst rate (in trades per second) during the last reporting period.
-
PEAK_BYTE_BURSTRATE, long: Peak byte burst rate (in trades per second) during the last reporting period.
-
PEAK_PACKET_BURSTRATE, long: Peak packet burst rate (in trades per second) during the last reporting period.
-
-
Add an instance of the adapter to a new StreamBase application as follows:
-
In StreamBase Studio, create a project, and create an EventFlow application file to host the adapter.
-
Drag the Input Adapter icon from the Operators & Adapters drawer in the Palette view to the canvas. Select the Exegy Monitoring Adapter from the list and click
. -
Select the adapter icon, and in the Properties view, select Adapter Properties and enter site-specific values for the Exegy server, login username, and password.
-
Connect an input stream to the adapter input port, and configure its schema with a command field of type string, as described above. The adapter generates a typecheck error if this required field is missing or of the wrong type, or if an unexpected field is present.
-
Connect output streams to the two adapter output ports.
The Exegy Monitoring adapter uses typecheck messages to help you configure the adapter in your StreamBase application. In particular, the adapter generates typecheck messages when:
-
The Admin input port schema is misconfigured.
-
Values for the Exegy Server Host, Login Username, or Login Password properties have not been entered.
The adapter emits warnings and errors messages on the status port and/or stderr during runtime under various conditions, including:
-
The Exegy Ticker Plant session disconnects.
-
An error is returned from the Execy Client API.
When suspended, the Exegy Monitoring Adapter stops emitting tuples on its output ports.
When resumed, the adapter begins emitting tuples on its output ports once again.