Contents
This sample demonstrates the use of the Spotfire Streaming Adapter for Thomson Reuters Enterprise Platform for Real-Time Publish (formerly known as the Thomson Reuters RMDS Publishing Output Adapter).
In StreamBase Studio, import this sample with the following steps:
-
From the top-level menu, select
> . -
Enter
thomson
to narrow the list of options. -
Select Thomson Reuters ... Publishing Output adapter from the StreamBase Market Data Adapters category.
-
Click
.
StreamBase Studio creates a project for this 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.
-
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
-
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.
-
Double-click the adapter icon to open the Properties view for the adapter.
-
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. -
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 an event tuple emitted on the
EventOut
stream indicating the adapter succeeded in listening for incoming connections. -
Use a TREP-RT subscribing client, such as one of the sample applications provided with the Spotfire Streaming 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:-
MarketPrice: AAPL.O, DIS.N, EBAY.O, GOOG.O, IBM.N, INTC.O, MSFT.O, NKE.C
-
MarketByOrder: AAPL.ARC, EBAY.ARC, GOOG.ARC, INTC.ARC, MSFT.ARC
-
MarketByPrice: AAPL.ARC, EBAY.ARC, GOOG.ARC, INTC.ARC, MSFT.ARC
-
MarketMaker: AAPL.OQ, EBAY.OQ, GOOG.OQ, INTC.OQ, MSFT.OQ
-
-
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.) -
In the Manual Input view, select the
DumpIn
stream and click . One tuple per item being published appears in the Output Streams view from theDumpOut
stream. Items with active subscriptions are identified as such (table_ActiveSubscription=true
). -
In the Manual Input view, select the
InfoQueryIn
stream, enterListSubscriptions
in theCommand
field, and click . One tuple per active subscription (as recorded within the adapter) appears in the Output Streams view from theInfoQueryOut
stream. A marker withDone=true
and all other fieldsnull
is the last tuple to appear on this stream. -
In the Manual Input view, enter
DumpDictionary
in theCommand
field and click . One tuple per Reuters dictionary field appears in the Output Streams view from theInfoQueryOut
stream. A marker withDone=true
and all other fieldsnull
is the last tuple to appear on this stream. -
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-pub
See Default Installation Directories for the default location of studio-workspace
on your system.