Contents
This sample demonstrates the use of the TIBCO StreamBase® Adapter for Thomson Reuters Enterprise Platform for Real-Time Subscribe (formerly known as the Thomson Reuters RMDS Subscribing Input Adapter).
-
Edit the RFA configuration file,
rfa-config.xml. Changing the P2PS (<serverList>and<portNumber>) parameters to match the Reuters infrastructure at your site. -
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.
-
In the Package Explorer, double-click to open one of the four message model-specific sample applications:
MarketByOrder.sbapp,MarketByPrice.sbapp,MarketMaker.sbapp, orMarketPrice.sbapp. Make sure the application is the currently active tab in the EventFlow Editor. -
Select the adapter icon to open the Properties view for the adapter.
-
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.)
-
Click the
Run button. This opens the SB Test/Debug perspective and starts the application.
-
In the Test/Debug Perspective, open the Application Output view. If connectivity to your RFA infrastructure is configured correctly, look for several event tuples emitted on the
Eventsstream. Events provide the login and dictionary load status. If you have added initial subscriptions to theinitial_subscriptions.txtfile, look for tuples emitted from theMarketDatastream as well. -
In the Manual Input view, select the
InfoQueryInstream, enterListSubscriptionsandMyTagin theCommandandTagfields, respectively, and click . One tuple per initial subscription appears in the Application Output view from theInfoQueryOutstream. A marker withDone=trueand all other fieldsnullis the last tuple to appear on this stream. -
In the Manual Input view, select the
DynamicSubscribestream. Enter values in theServiceandItemfields. (If using the Market Feed sample, you can enter a four-part subject value in theSubjectfield instead). Entertruein either theSubscribeorSnapshotfields and click . If the item you entered is active, look for one or more tuples representing the item's initial state emitted on theMarketDatastream in the Application Output view. If you entertruein theSubscribefield, a series of update tuples is emitted from theMarketDatastream as well. -
When done, press F9 or click the
Stop Running Application button.
This section describes how to run the sample in UNIX terminal windows or Windows command prompt windows. On Windows, be sure to use the StreamBase Command Prompt from the Start menu as described in the Test/Debug Guide, not the default command prompt.
-
Open four terminal windows on UNIX, or four StreamBase Command Prompts on Windows. In each window, navigate to the directory where the sample is installed, or to your workspace copy of the sample, as described above.
-
In window 1, type:
sbd MarketPrice.sbapp -
In window 2, type:
sbc dequeue -vThis window will display the tuples dequeued from the adapter's output ports.
-
In window 3, type:
echo ListSubscriptions,MyTag | sbc enqueue InfoQueryIn -
Observe in windows 2 that a tuple is emitted on the
InfoQueryOutport for each active subscription, followed by a tuple with a value oftruein itsDonefield. -
In window 4, subscribe to an Item:
echo DIRECT_FEED,MSFT.OQ,true,false | sbc enqueue DynamicSubscribe -
Observe in windows 2 that one or more tuples representing the item's initial state are emitted from the
MarketDatastream. -
In window 3 or 4, type the following command to terminate the server and dequeuer:
sbadmin shutdown
In StreamBase Studio, import this sample with the following steps:
-
From the top menu, click → .
-
Select this sample from the Embedded Input Adapters list.
-
Click OK.
StreamBase Studio creates a project for this sample.
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-subSee Default Installation Directories for the location of studio-workspace on your system.
In the default TIBCO StreamBase installation, this sample's files are initially installed in:
streambase-install-dir/sample/adapter/embedded/reuters-rmds-subSee Default Installation Directories for the default location of studio-workspace on your system.
