Thomson Reuters Enterprise Platform for Real-Time Contribution Output Adapter Sample

Introduction

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).

Importing This Sample into StreamBase Studio

In StreamBase Studio, import this sample with the following steps:

  • From the top-level menu, select File>Import Samples and Community Content.

  • 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 Import Now.

StreamBase Studio creates a project for this sample.

Preparing to Run the 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.

  1. Install the appropriate Thomson Reuters Java API version.

  2. Run the build script from the Thomson Reuters Examples directory: buildExamples.bat on Windows or buildExamples.ksh on Linux.

  3. 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 or config_editor.ksh on Linux.

  4. 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.

Running the Sample in StreamBase Studio

  1. 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 Maven>Update Project from the context menu.

  2. Open the src/main/eventflow/packageName folder.

  3. Double-click to open the ReutersRMDSContrib.sbapp module.

  4. Select the adapter icon to open the Properties view for the adapter.

  5. 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.

  6. Click the Run button. This opens the SB Test/Debug perspective and starts the module.

  7. 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.

  8. In the Manual Input view, enter an item name such as IBM.N in the MetaData.Item field, a post ID between 1 and 1000 in the MetaData.PostId field, and values in one of more of the MarketData subfields. Click Send Data.

  9. Look for a tuple emitted on the AckResponse stream indicating the post was received and acknowledged by the Posting Provider application.

  10. In the Console view, observe the raw OMM messages exchanged with the Posting Provider demo application.

  11. When done, press F9 or click the Terminate EventFlow Fragment button.

Sample Location

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.