RFA OMM Provider sample project
Best Answer
-
Hi @Atilla.Gurbuz,
I'm the development manager for RFA and several of the other APIs we build here. If you are just looking at starting a new project, instead of considering RFA please look at the Elektron SDK instead. ESDK is our strategic API offering that is providing the same functionality as RFA, but is much easier to learn and use and requires far less lines of code to accomplish the same thing. In addition, it is fully open source so you can see everything occurring in our implementation to help with learning, troubleshooting, and supporting your application.
ESDK has two layers to it, Elektron Message API (EMA) and Elektron Transport API (ETA).
ETA is just a renaming of UPA. EMA is higher level and is an ease of use layer above ETA;
EMA is a great starting point for you as it is easy to learn and you will likely be able to get something working very rapidly. In addition, the performance of EMA Java is far greater than RFA Java, particularly when also considering garbage collection and memory use.
You can find the ESDK information and downloads here on the Developer Community:
https://developers.thomsonreuters.com/electron
You can also download and access everything on GitHub here:
http://www.github.com/thomsonreuters/Elektron-SDK
Brian
0
Answers
-
Hello @Atilla,
For RFA Java edition, you may try a com.reuters.rfa.example.omm.prov.StarterProvider_Interactive example which is normally in the Examples folder of every RFA Java packages.
The example will use the default configuration settings: Java Preferences API (registry in Windows/Flat-file based in Non-Windows), you can avoid changing it by using a programmatic approach (com.reuters.rfa.config.ConfigDb) as well. Please refer to steps below:
At the StarterProvider_Interactive.java file,
1. Insert a new method below.
public ConfigDb getConfigDb() {
ConfigDb configDb = new ConfigDb();
configDb.addVariable("myNamespace.Sessions.provSession.connectionList", "myConnection");
configDb.addVariable("myNamespace.Connections.provConnection.connectionType", "RSSL_PROV");
configDb.addVariable("myNamespace.Connections.provConnection.portNumber", "14002");
return configDb;
}This method will create a configuration 'myNamespace::provSession' namespace which is a default namespace used by this example.
For the OMM Provider type of the application, the value of connectionType must be 'RSSL_PROV'.
For the portNumber, its default value is 14002, and can be changeable as desired.
For the other useful parameters are
- ipcTraceFlags (up to 31) is used to set the data-tracing level for the communication.
- logFileName (none/console/ or any filename) is used to specify the log output.
- mountTrace (true/false) is used to log connection information.
2. After adding the new method in step 1, you need to fix import error as well.
import com.reuters.rfa.config.ConfigDb;
3. Change the Context.initialize() statement to read the settings from the return object of the method in step 1.
// This statement is in a StarterProvider_Interactive() constructor.
Context.initialize(getConfigDb());4. The example reads dictionary files from /var/triarch. You can specify the new location at the following statements:
// These statements are in addCommandLineOptions() method
// The sample below shows the location
// of dictionary files in the same running directory
CommandLine.addOption("rdmFieldDictionary", "RDMFieldDictionary",
"RDMField dictionary name and location. Defaults to /var/triarch/RDMFieldDictionary");
CommandLine.addOption("enumType", "enumtype.def",
"RDMEnum dictionary name and location. Defaults to /var/triarch/enumtype.def");Then, re-compile the source code and run the application.
java -classpath <classpath> com.reuters.rfa.example.omm.prov.StarterProvider_Interactive
For instance:
java -classpath\Workspace\rfaj\rfaj8_0_0_L2\rfaj8.0.0.L2\bin;D:\Workspace\rfaj\rfaj8_0_0_L2\rfaj8.0.0.L2\Libs\rfa.jar com.reuters.rfa.example.omm.prov.StarterProvider_Interactive
If you can run the StarterProvider_Interactive successfully, it should print the following result to the console:
*****************************************************************************
* Begin RFA Java StarterProvider_Interactive Program *
*****************************************************************************
Initializing StarterProvider_Interactive ...
RFA Version: 8.0.0.L2.all.rrg
Initialization complete, waiting for client sessions
Feb 16, 2017 6:53:17 PM com.reuters.rfa.internal.connection.rsslp.RSSLChannelSessionServer openListener
INFO: com.reuters.rfa.connection.rsslp.myNamespace.myConnection
Connection successful: myNamespace::myConnection
Received OMM LISTENER EVENT: myNamespace::myConnection { state: SUCCESS, code: NONE, text: ""}Then, you can run any OMM Consumer application to connect to this provider, there should be further output printed in the console. For example.
Receive OMMActiveClientSessionEvent from client position : 10.42.86.208/U0154418-TPL-A/myNamespace::myConnection/RFA Java Edition 8.0.0.L2.all.rrg
Pub session accepted.
Received OMM INACTIVE CLIENT SESSION PUB EVENT MSG with handle: com.reuters.rfa.internal.session.ClientSessionHandle@6d86b085
ClientSession from 10.42.86.208/U0154418-TPL-A/myNamespace::myConnection/RFA Java Edition 8.0.0.L2.all.rrg has become inactive.
Feb 16, 2017 7:01:20 PM com.reuters.rfa.internal.session.ommp.OMMProviderImpl unregisterClient
WARNING: com.reuters.rfa.session.myNamespace.provSession
Handle already unregisteredNote: For RFA C++ or RFA .NET Edition, you can refer to <RFA Package>/Examples/StarterProvider_Interactive as well. Helpful documents can be found under <RFA Package>/Docs sub-folder.
Hope this helps!
0 -
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 251 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 650 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛