Contents
This topic describes how to run the TIBCO StreamBase® for CME MDP3 Adapter sample application, which illustrates how to use the adapter to access CME MDP feeds. For more information on this adapter, see CME MDP3 Adapter.
This sample includes a CME MDP3 adapter, which by default connects to channel 311 of CME's NRCert testing environment and is assumed to already be running and accessible from your machine. Once launched, use the sample to access market data messages from that channel.
In StreamBase Studio, import this sample with the following steps:
-
From the top-level menu, select
> . -
Enter
cme
to narrow the list of options. -
Select CME Market Data MDP3 from the Market Data Adapters category.
-
Click
.
StreamBase Studio creates a project for the adapter in your current Studio workspace.
The steps to run this sample in Studio are as follows:
-
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:
-
Install the
b2bits-jmdp3-2.0.2-mbp-with-mbo/b2bits-jmdp3-2.0.2.jar
file to the local Maven repository with a mvn command like the following:mvn install:install-file -Dfile=b2bits-jmdp3-2.0.2-mbp-with-mbo/b2bits-jmdp3-2.0.2.jar -DgroupId=com.epam.cme.mdp3 -DartifactId=b2bits-jmdp3 -Dversion=2.0.2 -Dpackaging=jar
-
Install the
b2bits-jmdp3-2.0.2-mbp-with-mbo/lib/b2bits-jmdp3-core-2.0.2.jar
file to the local Maven repository with a mvn command like the following:mvn install:install-file -Dfile=b2bits-jmdp3-2.0.2-mbp-with-mbo/lib/b2bits-jmdp3-core-2.0.2 -DgroupId=com.epam.cme.mdp3 -DartifactId=b2bits-jmdp3-core -Dversion=2.0.2 -Dpackaging=jar
-
-
Add these JAR files as Maven dependencies with steps similar to the ones described in 2. Add a Dependency.
-
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. -
You must also download
config.xml
andtemplates_FixBinary.xml
files from CME's publicly-accessible FTP site (see https://www.cmegroup.com/confluence/display/EPICSANDBOX/MDP+3.0+-+FTP+Site+Information) and place both files in your project'ssrc/main/resources
directory. -
After copying the two
.xml
files to your project src/main/resources folder, right-click and run > to clear the red marks from the project folder in the Project Explorer view. -
In the Project Explorer view, double-click to open the
mdp3.sbapp
application. -
Make sure the application is the currently active tab in the EventFlow Editor, then click the
Run button. This opens the SB Test/Debug perspective and starts the module.
-
The adapter is expected to connect to the channel's various feeds and the data should start flowing.
-
When done, press F9 or click the
Terminate EventFlow Fragment button.
This sample contains the following files:
-
The sample EventFlow application,
mdp3.sbapp
. -
subscriptions.csv
, an optional file containing the IDs and names of instruments to which to subscribe upon connection.
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_cme-mdp3
See Default Installation Directories for the default location of studio-workspace
on your system.