Thomson Reuters Enterprise Platform for Real-Time Subscribing Input Adapter Sample

Introduction

This sample demonstrates the use of the Spotfire Streaming Adapter for Thomson Reuters Enterprise Platform for Real-Time Subscribe (formerly known as the Thomson Reuters RMDS Subscribing Input 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 thomson to narrow the list of options.

  • Select Thomson Reuters Enterprise Platform for Real-Time Subscribing Input adapter from the StreamBase Market Data Adapters category.

  • Click Import Now.

StreamBase Studio creates a project for this sample.

Preparing to Run the Sample

  1. Edit the RFA configuration file, rfa-config.xml. Changing the P2PS (<serverList> and <portNumber>) parameters to match the Reuters infrastructure at your site.

  2. If you want to subscribe to one or more items when the adapter starts, add lines to the initial subscription file, initial_subscriptions.txt. This file contains a number of commented-out example subscriptions you can use as a starting point.

Running This 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. In the Project Explorer view, double-click to open one of the four message model-specific sample modules:

    MarketByOrder.sbapp
    MarketByPrice.sbapp
    MarketMaker.sbapp
    MarketPrice.sbapp

    Make sure the selected module is the currently active tab in the EventFlow Editor.

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

  5. Select the Adapter Settings tab and enter values for Username, Position, and Application, if required at your site. (At many sites, one or more of these parameters are unused, and can be left blank.)

  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. If connectivity to your RFA infrastructure is configured correctly, look for several event tuples emitted on the Events stream. Events provide the login and dictionary load status. If you have added initial subscriptions to the initial_subscriptions.txt file, look for tuples emitted from the MarketData stream as well.

  8. In the Manual Input view, select the InfoQueryIn stream, enter ListSubscriptions and MyTag in the Command and Tag fields, respectively, and click Send Data. One tuple per initial subscription appears in the Output Streams view from the InfoQueryOut stream. A marker with Done=true and all other fields null is the last tuple to appear on this stream.

  9. In the Manual Input view, select the DynamicSubscribe stream. Enter values in the Service and Item fields. (If using the Market Feed sample, you can enter a four-part subject value in the Subject field instead). Enter true in either the Subscribe or Snapshot fields and click Send Data. If the item you entered is active, look for one or more tuples representing the item's initial state emitted on the MarketData stream in the Output Streams view. If you enter true in the Subscribe field, a series of update tuples is emitted from the MarketData stream as well.

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

See Default Installation Directories for the default location of studio-workspace on your system.