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

Introduction

This sample demonstrates the use of the TIBCO StreamBaseĀ® Adapter for Thomson Reuters Enterprise Platform for Real-Time Publishing (formerly known as the Thomson Reuters RMDS Publishing 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 thomson to narrow the list of options.

  • Select Thomson Reuters ... Publishing 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

By default, the publishing adapter listens on TCP port 14002. To use a different port, edit the RFA configuration file, rfa-config.xml, and change the <portNumber> parameter of the <RSSLProviderConnection> 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. In the Project Explorer view, double-click to open one of the four message model-specific sample modules:

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

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

  4. Double-click the adapter icon to open the Properties view for the adapter.

  5. If you wish to publish to a different Reuters service than the default (DIRECT_FEED), click the Adapter Settings tab and change the Publish Service Name property to the desired value.

  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 an event tuple emitted on the EventOut stream indicating the adapter succeeded in listening for incoming connections.

  8. Use a TREP-RT subscribing client, such as one of the sample applications provided with the StreamBase TREP-RT Subscribing adapter, to subscribe to an item being published. Note that each sample application is driven by a message model-specific CSV file (such as MarketPriceFeed.csv) containing recorded feed data for the following items:

    1. MarketPrice: AAPL.O, DIS.N, EBAY.O, GOOG.O, IBM.N, INTC.O, MSFT.O, NKE.C

    2. MarketByOrder: AAPL.ARC, EBAY.ARC, GOOG.ARC, INTC.ARC, MSFT.ARC

    3. MarketByPrice: AAPL.ARC, EBAY.ARC, GOOG.ARC, INTC.ARC, MSFT.ARC

    4. MarketMaker: AAPL.OQ, EBAY.OQ, GOOG.OQ, INTC.OQ, MSFT.OQ

  9. When the client subscribes to an item listed above, look for event tuples emitted on the EventOut stream indicating the client has established a session with the publisher (EventType=ClientSession) and has subscribed to an item (EventType=Item, Action=Subscribe). (When using the client in direct-connect mode, you might also see login and dictionary download event tuples.)

  10. In the Manual Input view, select the DumpIn stream and click Send Data. One tuple per item being published appears in the Output Streams view from the DumpOut stream. Items with active subscriptions are identified as such (table_ActiveSubscription=true).

  11. In the Manual Input view, select the InfoQueryIn stream, enter ListSubscriptions in the Command field, and click Send Data. One tuple per active subscription (as recorded within the adapter) 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.

  12. In the Manual Input view, enter DumpDictionary in the Command field and click Send Data. One tuple per Reuters dictionary field 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.

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

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