We have need to get Specific FID of a RIC from TREP using RFA API. The scenario works like below
The first request to RIC would request for FID 1.In this case i expect the response to have FID 1
The Second request woudl request for FID 2. In this case i expect the response to have FID 1 and FID 2
Can you pls help me with the code which would help me to acheieve this
You can use View/Dynamic View feature to specific fields (field ids) that you want from TREP(ADS) in the request then TREP sends only fields specified in the request to your application as shown in the figure below:
Please refer to the article How to request particular fields of an item (RIC) via RFA API which shows the example source code how to request with View in RFA to get specific fields in responses.
Thanks Pimchaya Wongrukun for the reponse. I am able to incorporate this out application. But have a followup question as i get some issues randomly. Our application works like below
1. Place a request for a RIC (Say RIC1)asking for FID1 as part of response. We create a Subscription and keep the handle
handle=consumer.registerClient(eventQueue, subscribeInterest, consumerClient, recordKey)
2. Some time later (Say 2-3 min) , we would need FID2 associated with RIC1. In this case, we get the existing from Step 1 above add FID1 and FID2 to it and do the below
We observed we dont get FID2 sometime in the responses. Are we doing this resubscription part correctly here or there are alternatives?
Appreciate your help on this
I have tested reissueClient(..) to add FID1 and FID2 and it worked properly. After reissuing, the application received FID2 as well. It is possible that the feed does not provide FID2 in some responses; some responses have FID2 but some does not have. In this case, the application receives FID2 in the responses which the feed provides FID2. This is RFA expected behaviors; RFA passes data responses as it receives from the feed. You can prove this assumption by enabling RFAJ trace log to see what FIDs the feed sends to the application.
To enable RFAJ trace log file, please set ipcTraceFlags = 7, traceMsgTypes =ALL, traceMsgDomains=NORMAL,mountTrace=true and specify logFileName parameter of the RSSL connection node. The default location of the log file is in the application run directory.
<node name="consConnection"> <map> <entry key="connectionType" value="RSSL"/> <entry key="serverList" value="ads"/> <entry key="portNumber" value="14002"/> <entry key="ipcTraceFlags" value="7"/> <entry key="mountTrace" value="true"/> <entry key="logFileName" value="D:\rfa.log"/> <entry key="traceMsgDomains" value="NORMAL"/> <entry key="traceMsgTypes" value="ALL"/> </map> </node>