We are building Level2 MarketByPrice data feed using RFA API and got Invalid InterestSpec type re...

...ceived
We tried to run the Market By Price test and got Exception : Invalid InterestSpec type received: OMM_ITEM_INTEREST_SPEC "125". Following is what we set in the code.
OMMItemIntSpec ommItemIntSpec = new OMMItemIntSpec();
ommmsg.setMsgType(OMMMsg.MsgType.REQUEST);
ommmsg.setMsgModelType(capability);
ommmsg.setPriority((byte)1, 1);
String itemName = client.getRfaSubKey();
ommmsg.setIndicationFlags(OMMMsg.Indication.REFRESH);
ommmsg.setAttribInfo(getServiceName(), itemName, RDMInstrument.NameType.RIC);
ommItemIntSpec.setMsg(ommmsg);
Handle itemHandle = marketDataSubscriber.registerClient(eventQueue, ommItemIntSpec, client, null);
Best Answer
-
Hello @anil.kalra,
Could you please confirm the type of marketDataSubscriber used in the following code?
Handle itemHandle = marketDataSubscriber.registerClient(eventQueue, ommItemIntSpec, client, null);
The OMMItemIntSpec needs to be used by the OMMConsumer to register for Market By Price item request. It will throw the following exception if you register OMMItemIntSpec with MarketDataSubscriber Event Source.
Exception in thread "main" java.lang.IllegalArgumentException: Invalid InterestSpec type received: OMM_ITEM_INTEREST_SPEC "125"
at com.reuters.rfa.internal.session.md.MarketDataSubscriberImpl.registerClient(Unknown Source)You can find example code in this tutorial.
0
Answers
-
Hello @anil.kalra
The application gets the exception because you set 125 which is one value of com.reuters.rfa.common.InterestSpec constant at ommmsg.setMsgModelType(capability).
setMsgModelType(..) method requires the message model type defined in com.reuters.rfa.rdm.RDMMsgTypes constant not com.reuters.rfa.common.InterestSpec constant. The RDMMsgTypes is shown below:
For the complete list, please refer to [RFAJ package]/Docs/refman/rfajava/constant-values.html
To request MarketByPrice, you need to set com.reuters.rfa.rdm.RDMMsgTypes.MARKET_BY_PRICE or 8 shown in the table above in setMsgModelType(..) method. The example snipped source code:
short capability = com.reuters.rfa.rdm.RDMMsgTypes.MARKET_BY_PRICE;
…
ommmsg.setMsgModelType(capability);I suggest you look into StarterConsumer application located in [RFAJ package]\Examples\com\reuters\rfa\example\omm\cons . The application demonstrates how to subscribe to level1 and level2 data.
Hope this help.
0 -
Hello @pimchaya.wongrukun01
I did set the MsgModelType as RDM constants. Sorry I missed to post the following two lines. Also I did look at the RFA tutorial 9 for Level2.
short capability = RDMMsgTypes.MARKET_BY_PRICE;
if(subKey.getDepth() == Depth.MarketMaker) {
capability = RDMMsgTypes.MARKET_MAKER;
}
...........
ommmsg.setMsgModelType(capability);
Thanks.
0 -
Hello @pimchaya.wongrukun01
I did set the MsgModelType as RDM constants. Sorry I missed to post the following two lines. Also I did look at the RFA tutorial 9 for Level2.
short capability = RDMMsgTypes.MARKET_BY_PRICE;
if(subKey.getDepth() == Depth.MarketMaker) {
capability = RDMMsgTypes.MARKET_MAKER;
}
...........
ommmsg.setMsgModelType(capability);
Thanks.
0 -
Hello @anil.kalra
In case the problem still occurs:
I modify tutorial 9 to use ommmsg.setMsgModelType((short)125). When I run with RFA8.1.0.E2. I did not receive the error as your application got but I got the following status message instead:
MESSAGE
Msg Type: MsgType.STATUS_RESP
Msg Model Type: Unknown Msg Model Type: 125
Indication Flags:
Hint Flags: HAS_ATTRIB_INFO | HAS_STATE
State: OPEN, SUSPECT, NONE, "No connection or service is currently up that supports this request."
AttribInfo
ServiceName: API_ELEKTRON_EPD_RSSL
Name: BBH.ITC
NameType: 1
Payload: NoneHave you tried your application with the latest RFA version(8.1.0.E2)?
If the problem still occurs with RFA version(8.1.0.E2) or the application receives a status message like above, you should review your source code to make sure that MARKET_BY_PRICE is set in the last setMsgModelType(..) before calling registerClient(..) method.
0 -
Hello veerapath.rungruengrayubkul, Pimchaya.Wongrukun
Thanks for your reply and sorry for the late response. I got the level 2 working using RFA OMM message.
I have another question regarding RFA OMMMap. We want to do the parsing of different handles(Ric symbols) in parallel so we want to pass the RFA OMM payload to a different thread and not parse it in the consumer thread. Is it safe to pass the payload to different processing thread.
I know in EMA is it not recommended to do so because the field entries and field lists are reused.
Thanks
Anil Kalra
0 -
Hello @anil.kalra
Please post your new questions as a separate question, not as an answer. When the answer of this post is accepted, marked as "correct", the community tends to only look at the accepted answer and may miss your new questions on the same topic. Posting the new questions on a separate page allows everyone can see the questions and can post answers to help you.
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
- 684 Datastream
- 1.4K DSS
- 613 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
- 248 ETA
- 552 WebSocket API
- 37 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
- 637 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
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 88 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛