Omm mock Tests

In 7.6* API we have TibMsg tibMsg = new TibMsg() so we can create a mock message and reply to mock tests. But in 8.1* there is no Tib libraries and response we get is OmmMsg. So can someone please guide on how I can create new OmmMsg since it's interface so can't create new and don't have any implementations for this interface too.
Best Answer
-
Hello @Jaydipkumar.pansuriya
Please refer to RFA Java Developers Guide in section 6.14 Creating the Message which explains how to create OMM message in details with the sample source code.
0
Answers
-
Are you using RFA Java or C++ - I will assume RFA Java based on the TibMsg() snippet above?
You are correct that you cannot create an OMMMsg directly.
You can use acquireMsg() to acquire an OMMMsg from OMMPool and then releaseMsg() to release the OMMMsg back to the pool when finished with it.
This is described in more detail in the RFA Java Documentation - including the RFAJ_DeveloperGuide - which you can also find in the Docs folder of the RFA SDK package.
0 -
Thank you @umer.nalla for reply.
I am using RFA Java. Issue is that I want to write a mock test which will provide me mocked OMMMsg. With Tib I was doing like this
TibMsg tibMsg = new TibMsg();
for (Map.Entry<String, String> entrySet : fakeEntries.entrySet()) {
tibMsg.Append(entrySet.getKey(), entrySet.getValue());
}But now that OMMMsg is an interface and its architecture is also complex that I can not implement that interface and create a new Mock class.
When I acquire msg from pool it will be kind of blank object and I want to set payload and other information also which I can't figure out how to do.
For mocking/testing there is no information provided in guides.
0 -
You have not explained exactly why you need to create your Mock class. I can only assume you are using it to publish dummy data in response to a request for such data by a subscriber.
If this is the case, then please refer to the RFA Java StarterProviderInteractive example which you can find in the Examples\com\reuters\rfa\example\omm\prov folder.
In there you will find the ProviderClientSession class which has a couple of methods which show how to publish dummy data responses - processItemRequest() and sendUpdates().
However, before you go too far down this route - is there any reason why you cannot use our newer Elektron Message API (EMA) Java edition to develop your new OMM based application?
I mention EMA because it is generally much simpler to learn, develop and maintain code using EMA than RFA. So, if you compare the above RFA example code with the code demonstrated in the EMA NI Provider tutorial - you will see how much simpler the code for publishing a response is in EMA Java compared to RFA.
EMA is also our strategic API - so any new features etc will only appear in EMA. RFA is feature-complete - and therefore it does not generally make sense to develop any new applications using RFA (unless you have a strong reason for doing so).
To get an appreciation of EMA, I recommend you spend some time working through the tutorials - so you can determine for yourself how much simpler EMA is to use.
0 -
You are right I am creating mock tests so writing code to send dummy data in response. Currently we are moving from SSL to RSSL so need to upgrade RFA api. But definitely I will look at your suggestion to move to EMA. Just one thing is there any separate licence required for EMA? I will propose this to team after gathering details on it.
0 -
Hello @Jaydipkumar.pansuriya
EMA is free. You do not need to have any license.
To migrate from RFA MarketData interface to EMA, please refer to Why Migrate from RFA to EMA API? video. This video explains what EMA is, the benefits, the comparison of RFA and EMA, resources which help you to migrate from RFA to EMA.
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
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 279 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 716 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
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛