Contents
This sample demonstrates the use of the Spotfire Streaming Adapter for Thomson Reuters Enterprise Platform for Real-Time Contribution (formerly known as the Thomson Reuters RMDS Contribution Output Adapter).
In StreamBase Studio, import this sample with the following steps:
-
From the top-level menu, select
> . -
Enter
contrib
to narrow the list of options. -
Select Thomson Reuters Enterprise Platform for Real-Time Contribution Output adapter from the StreamBase Market Data Adapters category.
-
Click
.
StreamBase Studio creates a project for this sample.
The sample is a Reuters Posting Consumer application and as such interacts with a
Posting Provider. StreamBase includes a Posting Provider demo that can be run with
this sample. This sample includes an XML file, PostingProvider.xml
, to configure the namespace, session, and
connection for the Posting Provider demo.
-
Install the appropriate Thomson Reuters Java API version.
-
Run the build script from the Thomson Reuters Examples directory:
buildExamples.bat
on Windows orbuildExamples.ksh
on Linux. -
Configure the namespace, session, and connection used by the Reuters Posting Provider demo application by importing
PostingProvider.xml
with the Reuters configuration editor tool located in the RFA/Java Tools directory:config_editor.bat
on Windows orconfig_editor.ksh
on Linux. -
Return to the top-level RFA/Java directory and run the Posting Provider demo with commands like the following examples. The UNIX example is one long command, with line breaks shown by the closing slash:
java -classpath \ Examples:Libs/rfa.jar com.reuters.rfa.example.omm.postingProvider.StarterProvider_Post \ -provSession SBProviderNamespace::SBProviderSession \ -sendUpdates false -supportPost true -ackList 1-1000 \ -positiveAck true -setStatusCode true -setStatusText true \ -sendPublisherInfo true -rdmFieldDictionary etc/RDM/RDMFieldDictionary \ -enumType etc/RDM/enumtype.def
The Windows example is also one long command, shown on several lines for publication clarity:
java -classpath Examples;Libs\rfa.jar com.reuters.rfa.example.omm.postingProvider.StarterProvider_Post -provSession SBProviderNamespace::SBProviderSession -sendUpdates false -supportPost true -ackList 1-1000 -positiveAck true -setStatusCode true -setStatusText true -sendPublisherInfo true -rdmFieldDictionary etc\RDM\RDMFieldDictionary -enumType etc\RDM\enumtype.def
By default, the contribution adapter connects to localhost TCP port 14003, which is
appropriate when running with the Reuters Posting Provider demo as configured above.
To use a different host or port number, edit the RFA configuration file, rfa-config.xml
, and change the <serverList>
and/or <portNumber>
parameter of the <RSSLContributorConnection>
node to the desired value.
-
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
-
Double-click to open the
ReutersRMDSContrib.sbapp
module. -
Select the adapter icon to open the Properties view for the adapter.
-
Click the Debugging tab and select the Display Reuters Messages Sent and Display Reuters Messages Received checkboxes. Note that these properties should not be set in a production application, but are instructive when running the sample.
-
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. Look for tuples emitted on the
Status
stream indicating the adapter succeeded in logging in to, and downloading dictionaries from, the Reuters Posting Provider demo application. -
In the Manual Input view, enter an item name such as
IBM.N
in theMetaData.Item
field, a post ID between 1 and 1000 in theMetaData.PostId
field, and values in one of more of the MarketData subfields. Click . -
Look for a tuple emitted on the
AckResponse
stream indicating the post was received and acknowledged by the Posting Provider application. -
In the Console view, observe the raw OMM messages exchanged with the Posting Provider demo application.
-
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_adapter_embedded_reuters-rmds-contrib
See Default Installation
Directories for the default location of studio-workspace
on your system.