The TIBCO StreamBase® Input Adapter for CME Market Data allows StreamBase to receive data from a CME Market Data Protocol (MDP3) connection.
The CME MDP3 adapter is a member of the Java Adapters group in the Palette view in StreamBase Studio. Select the adapter from the Insert an Operator or Adapter dialog, following these steps:
Open the Insert an Operator or Adapter dialog with one of the following methods:
Drag the Adapters, Java Operators token from the Operators and Adapters drawer of the Palette view to the canvas.
Click on the canvas where you want to place the adapter, then invoke the keyboard shortcut
From the top-level menu, invoke> .
In the search field, enter
CMEto narrow the list of adapters.
Select the CME MDP3 adapter and click.
In order run, the adapter requires that the open-source Java Market Data Handler for CME Market Data (MDP 3.0) from EPAM Systems be installed on development and deployment machines that are expected to run StreamBase applications that call this adapter. You can obtain the Data Handler software from public.tibco.com.
Once you download the above zip file, extract its contents to a temporary location and Maven install the following JAR files to your Maven repository:
b2bits-jmdp3-2.1.4-mbp-with-mbo/b2bits-jmdp3-2.1.4.jarfile to the local Maven repository with a mvn command like the following:
mvn install:install-file -Dfile=b2bits-jmdp3-2.1.4-mbp-with-mbo/b2bits-jmdp3-2.1.4.jar -DgroupId=com.epam.cme.mdp3 -DartifactId=b2bits-jmdp3 -Dversion=2.1.4 -Dpackaging=jar
b2bits-jmdp3-2.1.4-mbp-with-mbo/lib/b2bits-jmdp3-core-2.1.4.jarfile to the local Maven repository with a mvn command like the following:
mvn install:install-file -Dfile=b2bits-jmdp3-2.1.4-mbp-with-mbo/lib/b2bits-jmdp3-core-2.1.4 -DgroupId=com.epam.cme.mdp3 -DartifactId=b2bits-jmdp3-core -Dversion=2.1.4 -Dpackaging=jar
The adapter has two input streams, one for commands and the other for instrument subscriptions. The command stream currently takes the CONNECT and DISCONNECT command. The subscription stream is used to SUBSCRIBE or UNSUBSCRIBE to the specified instrument (specified by SecurityID and SecurityDesc) or to UNSUBSCRIBEALL (to remove all subscriptions). Note that subscriptions are not dynamic; any subscription changes do not fully take effect until the connection is cycled (DISCONNECT then CONNECT).
This section describes the properties you can set for the adapter, using the various tabs of the Properties view in StreamBase Studio.
In following section tables, the Property column shows each property name as found in the one or more adapter properties tabs of the Properties view for this adapter.
Name: Use this required field to specify or change the name of this instance of this component, which must be unique in the current EventFlow module. The name must contain only alphabetic characters, numbers, and underscores, and no hyphens or other special characters. The first character must be alphabetic or an underscore.
Adapter: A read-only field that shows the formal name of the adapter.
Class name: Shows the fully qualified class name that implements the functionality of this adapter. If you need to reference this class name elsewhere in your application, you can right-click this field and select Copy from the context menu to place the full class name in the system clipboard.
Start options: This field provides a link to the Cluster Aware tab, where you configure the conditions under which this adapter starts.
Enable Error Output Port: Select this check box to add an Error Port to this component. In the EventFlow canvas, the Error Port shows as a red output port, always the last port for the component. See Using Error Ports to learn about Error Ports.
Description: Optionally enter text to briefly describe the component's purpose and function. In the EventFlow Editor canvas, you can see the description by pressing Ctrl while the component's tooltip is displayed.
The MDP3 adapter has the following properties:
|Channel Config File||string||N/A||
REQUIRED. Must point to the MDP channel configuration file (typically
|Message Templates File||string||N/A||
REQUIRED. Must point to the MDP template file (typically named
|Channel ID||integer||N/A||REQUIRED. Number of the channel to which to connect (to connect to multiple channels, use separate instances of the adapter).|
|Market Data Type||radio buttons||Market By Order||Whether to use Market By Price or Market By Order.|
|Subscribe To All Instruments||check box||unchecked (false)||Whether to subscribe to all instruments available on the channel, or to subscribe to individual instruments via either a subscription file or the subscription input port, or both.|
If Subscribe To All Instruments is
unchecked, a CSV file containing the list of initial subscriptions may be
specified. The format of this file is as follows:
# This is a comment
|Connect At Startup||check box||unchecked (false)||Whether to attempt to connect to the data feed when the application is launched.|
|Gap Threshold||integer||0||Number of out-of-sequence messages beyond which a replay is issued (0 to use default value (5)).|
|Incremental Queue Size||integer||0||Size of the message queue on incremental feeds (0 to use default (15000)).|
|Receive Buffer Size||integer||0||Size of the receive buffer (0 to use default (4 * 1024 * 1024)).|
|Replay Threads||integer||0||The number of replay threads to use when requesting a TCP gap fill replay. If 0 no TCP replay will be done and Full Snapshot replays will always be used.|
|Max TCP Attempts||integer||0||If Replay Threads is greater than 0, this value indicates how many TCP replay attempts are made before switching to a full snapshot replay. (0 to use default (3)).|
|Network Interface Name (Feed A)||string||blank||Name of the Network Interface Card to use to establish connections to the A feed (leave blank to use default).|
|Network Interface Name (Feed B)||string||blank||Name of the Network Interface Card to use to establish connections to the B feed (leave blank to use default).|
|User Name||string||blank||User name to use when logging on to the TCP Replay feed (leave blank to use default).|
|Password||string||blank||Password to use when logging on to the TCP Replay feed (leave blank to use default).|
|Log Level||drop-down list||INFO||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 will be used. Available values, in increasing order of verbosity, are: OFF, ERROR, WARN, INFO, DEBUG, TRACE.|
Use the settings in this tab to allow this operator or adapter to start and stop based on conditions that occur at runtime in a cluster with more than one node. During initial development of the fragment that contains this operator or adapter, and for maximum compatibility with TIBCO Streaming releases before 10.5.0, leave the Cluster start policy control in its default setting, Start with module.
Cluster awareness is an advanced topic that requires an understanding of StreamBase Runtime architecture features, including clusters, quorums, availability zones, and partitions. See Cluster Awareness Tab Settings on the Using Cluster Awareness page for instructions on configuring this tab.
Use the Concurrency tab to specify parallel regions for this instance of this component, or multiplicity options, or both. The Concurrency tab settings are described in Concurrency Options, and dispatch styles are described in Dispatch Styles.
Concurrency settings are not suitable for every application, and using these settings requires a thorough analysis of your application. For details, see Execution Order and Concurrency, which includes important guidelines for using the concurrency options.
The adapter has two input ports — the command and subscription ports.
Use the command port to programmatically trigger a connection or disconnection.
|Field Name||Field Type||Description|
The command to execute:
Use the subscription port to programmatically add or remove subscriptions of instruments on the channel.
|Field Name||Field Type||Description|
The command to execute:
The ID number (SecurityID tag) of the instrument to which to subscribe or
unsubscribe. Ignored for the
The description (SecurityDesc tag) of the instrument to which to subscribe.
Ignored for the
The adapter has several output ports:
Status: Emits tuples related to status events (successful operations, errors, etc)
Full Snapshot: Market Data Full Snapshot messages
Incremental Refresh: Market Data Incremental Refresh messages
RFQ: RequestForQuote messages
Security Status: SecurityStatus messages
Security Definition: SecurityDefinition messages
The schema for the Status port is described below, while the schema for the other ports simply contain every field in the received message. Null fields indicate that the corresponding field was not specified in the message. Repeating groups are represented as a list of tuples, where each tuple represents one group.
The status port emits tuples that describe events of interest, such as errors or the result of executing a command.
|Field Name||Field Type||Description|
Describes this event. Possible values can include
|info||list<string>||Contains any additional information pertaining to this event.|
Typechecking fails if the input schema does not contain all the required fields.
Upon suspension, the adapter finishes processing any message in flight, outputs the result tuples, then pauses until operation is resumed. Any messages received while paused are dropped.
Upon resumption, the adapter continues processing new messages as they are received.
The StreamBase installation includes a sample demonstrating the use of this adapter.
To load the sample in StreamBase, select
cme to narrow the possible
choices. Select the entry called CME MDP3 Adapter.