Hi, I'm just starting to work/learn on RFA and just have gone through the project on Tutorials tab which is a consumer project. Would you suggest a source to get a basic Provider example? Thanks.
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
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
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 directoryCommandLine.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_InteractiveFor 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.rrgInitialization complete, waiting for client sessionsFeb 16, 2017 6:53:17 PM com.reuters.rfa.internal.connection.rsslp.RSSLChannelSessionServer openListenerINFO: com.reuters.rfa.connection.rsslp.myNamespace.myConnectionConnection successful: myNamespace::myConnectionReceived 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.rrgPub session accepted.Received OMM INACTIVE CLIENT SESSION PUB EVENT MSG with handle: com.reuters.rfa.internal.session.ClientSessionHandle@6d86b085ClientSession 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 unregisterClientWARNING: com.reuters.rfa.session.myNamespace.provSessionHandle already unregistered
Note: 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!
Thanks @brian.sandri when should we expect .Net SDK version of the Elektron?
Cheers,
Atilla