RFA Jar upgrade from version 5.2 to 8.2 for JAVA technology/API

Dear Refinitiv Support Team,

Our project java base application currently uses RFA version 5.2, which has now become outdated. At the client’s request, we are in the process of upgrading to RFA version 8.2. Given that our application was originally built on the Market Data Layer interface, we are encountering challenges because RFA 8.2 has fully deprecated the MDL, requiring us to transition to the OMM interface.

In our consumer side implementation, we have encountered some constants and classes from RFA 5.2 for which we are unable to identify replacements in the OMM interface. Below is a list of the constants and classes that we’re using in our current codebase, specifically in the processEvent method, for which we are seeking guidance on suitable alternatives in RFA 8.2.

Constants:

  • Event.MARKET_DATA_SVC_EVENT
  • Event.ENTITLEMENTS_AUTHENTICATION_EVENT
  • MarketDataItemEvent.IMAGE
  • MarketDataItemEvent.UNSOLICITED_IMAGE
  • MarketDataItemEvent.UPDATE
  • MarketDataItemEvent.CORRECTION
  • MarketDataItemEvent.CLOSING_RUN
  • MarketDataItemEvent.GROUP_CHANGE
  • MarketDataItemEvent.RENAME

Classes:

  • MarketDataSvcEvent
  • TibMsg
  • TibField

If it would help, I can provide sample code illustrating how our application is currently implemented with the Market Data Layer. This could provide more context for our usage and help identify alternative approaches in the OMM interface.

New JAR Manifest Details:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.2
Created-By: 1.8.0_51-b16 (Oracle Corporation)
Build-Date: 2024-02-09 05:05:49
Specification-Title: RFA Java
Specification-Version: 8.2
Specification-Vendor: Refinitiv
package_Version: 8.2.4.L2.all
Implementation-Version: 8.2.4.L2.all

Could you please advise on suitable replacements for the above constants and classes, or provide guidance on how to implement similar functionality using the OMM interface in RFA 8.2?

Thank you for your assistance with this migration.

Regards,
Bhavya Dudhia

Best Answers

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @bhavya.dudhia

    Please note that the RFA MarketFeed class cannot be compared to the EMA (and RFA) OMM class one-by-one. However, some comparisons are as follows:

    ### Event.MARKET_DATA_SVC_EVENT ###

    Like I said above, the EMA API automatic dispatches messages to a valid callback methods.

    • Refresh/Image message: onRefreshMsg()
    • Update messages: onUpdateMsg()
    • Status messages: onStatusMsg()
    • Ack messages: onAckMsg()
    • Generic Messages: onGenericMsg

    However, there is the com.refinitiv.ema.access.Msg class that represents all message types. It has the domainType() method that returns the message's domain type information.

    ### MarketDataItemEvent.IMAGE ###

    In the EMA, the Refresh message class is com.refinitiv.ema.access.RefreshMsg.

    ### Market DataItemEvent.UPDATE ###

    In the EMA, the Refresh message class is com.refinitiv.ema.access.UpdateMsg.

    ### MarketDataItemEvent.UNSOLICITED_IMAGE ###

    The Unsolicited or Solicited information is now part of the Refresh Message attributes:

    refresh-events.png

    Please see EMA J RDM Usage Guide for more detail

    ### CORRECTION, CLOSING_RUN, etc. ###

    This information as now part of the Update Message UpdateTypeNum component. Please see my colleague answer on this How to detect closing run events? old post for more detail.

    update-events.png


  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @bhavya.dudhia

    Please be informed that the RFA 8 OMM interfaces are not compatible with the RFA MarketFeed interfaces, so you need to re-write an application anyway, so that why I suggested to migrate to the easier path like the EMA API.

    However, the RFA MarketFeed and OMM interfaces cannot be mapping because the data structure is so much difference.

    omm_3.png

    The pseudo code for getting the OMM String data with RFA Java are as follows:

    OMMFieldEntry fe = (OMMFieldEntry)entry;
    ...
    data = fe.getData();
    short dataType = data.getDataType(); // data is OMMData object to be decoded
    switch(dataType){
    	case OMMTypes.BUFFER:
    	case OMMTypes.UTF_STRING:
    	case OMMTypes.ASCII_STRING:
    	String s = ((OMMDataBuffer)data).toString();
    

    You can find a full detail on Chapther 10 OMM Data of the RFA Java Developer Guide document. The file is available in the API package and RFA Java documents page.

    omm_2.png

    Please be informed that the latest version of the RFA Java is 8.2.5.

    • If you are using OpenDACS API alongside RFA with Java 17, please use RFA Java version 8.2.5.E1
    • If not, please use RFA Java 8.2.5.L1
    rfa_1.png
  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @bhavya.dudhia

    Question 1: Do I need to initialize and load a Field Dictionary to decode these responses?

    Answer: Yes, you need to init and load Field Dictionary data to decode incoming FID data.

    Question 2: If yes, where can I obtain the dictionary files (e.g., RDMFieldDictionary and enumtype.def)?

    Answer: About the dictionary, an application can load from local files (RDMFieldDictionary and enumtype.def files) or download from the ADS server.

    By default, the Dictionary files are available in the <API package>\etc\RDM\ folder as follows:

    rfa_package.png

    However, the files must be the same version as the ADS server, so you need to copy the files from the ADS machine. Please contact your Market Data team to help you on this.

    To download from the ADS, an application needs to write code to download Dictionary Data from the ADS server. You can check the DictionaryClient class example in <API package>\Examples\com\reuters\rfa\example\omm\dictionary folder.

    Question 3: Are there any specific configurations or steps I need to follow to use these dictionaries in my code?

    Answer: Please check my colleague answer on this old post.

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @bhavya.dudhia

    By default, the API requests all fields' data for a consumer application. To request only specific fields, an application can use the View feature to specify only interested FIDs.

    view.png

    You can find the View example on the StarterConsumer_BatchView example in the <RFA API Package>\Examples\com\reuters\rfa\example\omm\batchviewcons folder.

    Note: That example also demonstrates how to use the Batch feature (request multiple items via a single message). The Batch feature can be combined with the View feature.

    About how to decode the field data, I highly recommend you check the GenericOMMParser.java class in the <RFA API Package>\Examples\com\reuters\rfa\example\utility folder.

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @bhavya.dudhia

    I found that the service name is DTS. Is it the correct service name?

    According to the previous response, the service name is IDN_RDF.

Answers

  • Hello @bhavya.dudhia

    If you are migrating from the legacy RFA version 5, I strongly suggest you migrate to the strategic Enterprise Message API (EMA API) of the Real-Time SDK Java edition. The EMA is the open-source Message level API that can connect and consume data from the LSEG Real-Time Platform via the RSSL connection (the same as RFA 8). The EMA API let you interact with the connection and OMM data via easier to use API interfaces than the RFA API.

    The example code of the EMA Consumer API is as follows:

    // Process Incoming Data
    class AppClient implements OmmConsumerClient{
        public void onRefreshMsg(RefreshMsg refreshMsg, OmmConsumerEvent event){
            //Process Refresh Msg
        }
        
        public void onUpdateMsg(UpdateMsg updateMsg, OmmConsumerEvent event) {
            //Process Update Msg
        }


        public void onStatusMsg(StatusMsg statusMsg, OmmConsumerEvent event) {
            //Process Status Msg
        }
        
        public void onGenericMsg(GenericMsg genericMsg, OmmConsumerEvent consumerEvent){}
        public void onAckMsg(AckMsg ackMsg, OmmConsumerEvent consumerEvent){}
        public void onAllMsg(Msg msg, OmmConsumerEvent consumerEvent){}
        
    }


    public class Consumer {
        public static void main(String[] args){
            OmmConsumer consumer = null;
            try
            {
                AppClient appClient = new AppClient();
                
                //Establish a connection and send OMM Login Request to the Real-Time Platform
                consumer  = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig().host("localhost:14002").username("user"));
                
                //Send Item Request to to the Real-Time Platform
                consumer.registerClient(EmaFactory.createReqMsg().serviceName("IDN_RDF").name("IBM.N"), appClient);
                
                Thread.sleep(60000);            // API calls onRefreshMsg(), onUpdateMsg() and onStatusMsg()
            }
            catch (InterruptedException | OmmException excp)
            {
                System.out.println(excp.getMessage());
            }
            finally 
            {
                if (consumer != null) consumer.uninitialize();
            }
        }
    }

    You may notice that the EMA API uses the callback methods to process each message type as follows:

    • Refresh/Image message: onRefreshMsg()
    • Update messages: onUpdateMsg()
    • Status messages: onStatusMsg()

    An application can choose to let the API automatic dispatches incoming messages to those callback methods, or an application can dispatch them manually. The suggested examples to check ares:


  • Hi @wasin.w ,

    Thank you for your detailed feedback on my question. Based on your input, I understand that we need to use EMA (Open-source Message Level API) JAR, but it is not an option for my project at this time, and that I have to implement the solution using RFA version 8.2.4.

    Additionally, in your previous explanation, you did not cover TibMsg and TibField. We have to implement alternatives to these fields as well. We are using this fields to retrieve data in String or Double format. But Now we can get it in OMM layer?

    Existing Implementation:

    TibMsg tibMsg = new TibMsg();
    tibMsg.UnPack(data);
    TibField tibField = tibMsg.Get("string");
    String resData = tibField.StringData();

    Sorry for late replay but due to some enhancement on LSEG Community website, I'm not able to post new comment or post.

    Thank You
    Bhavya Dudhia

  • Again, Thanks @wasin.w for the quick and detailing answer, it's helping me a lot.

    I have implemented code to successfully connect to Reuters and send requests. However, I am currently facing challenges in decoding the response data.

    Previously, we used TibMsg for decoding, but as suggested, I am now working with OMMFieldList and OMMFieldEntry. Unfortunately, I am unable to retrieve the correct data.

    When parsing the message using GenericOMMParser Class, I receive the following response:

    image.png image.png

    I need assistance in decoding the following fields:

    • ASK
    • BSK
    • TRAD_DATE
    • Q

    While debugging, I observe the following:

    • OMMFieldEntry.getDataType() always returns 0 (UNKNOWN).
    • OMMFieldEntry.getType() always returns 257 (FIELD_ENTRY).

    I suspect this might be due to the absence of a Field Dictionary. Could you confirm:

    1. Do I need to initialize and load a Field Dictionary to decode these responses?
    2. If yes, where can I obtain the dictionary files (e.g., RDMFieldDictionary and enumtype.def)?
    3. Are there any specific configurations or steps I need to follow to use these dictionaries in my code?

    Your guidance on how to decode the FIELD_ENTRY data and retrieve the required fields will be greatly appreciated.

    Thank you for your support.

    Note - RFA Version: 8.2.4.L2.all

  • Again, Thanks @wasin.w for your quick and detailed answer, it's helping me a lot.

    I have implemented code to successfully connect to Reuters and send requests. However, I am currently facing challenges in decoding the response data.

    Previously, we used TibMsg for decoding, but as suggested, I am now working with OMMFieldList and OMMFieldEntry. Unfortunately, I am unable to retrieve the correct data.

    When parsing the message using GenericOMMParser, I receive the following response:

    image.png image.png

    I need assistance in decoding the following fields:

    • ASK
    • BSK
    • TRAD_DATE
    • Q

    While debugging, I observe the following:

    • OMMFieldEntry.getDataType() always returns 0 (UNKNOWN).
    • OMMFieldEntry.getType() always returns 257 (FIELD_ENTRY).

    I suspect this might be due to the absence of a Field Dictionary. Could you confirm:

    1. Do I need to initialize and load a Field Dictionary to decode these responses?
    2. If yes, where can I obtain the dictionary files (e.g., RDMFieldDictionary and enumtype.def)?
    3. Are there any specific configurations or steps I need to follow to use these dictionaries in my code?

    Your guidance on how to decode the FIELD_ENTRY data and retrieve the required fields will be greatly appreciated.

    Thank you for your support.

    Note - RFA Version: 8.2.4.L2.all

  • Hi @bhavya.dudhia

    Our project is also migrating from RFA 6.3 to RFA 8.2.5, and we cannot use the new EMA (Open-source Message Level API) due to client request.

    I see you have successfully implemented the RFA 8.2 and able to connect to Reuters and send requests.

    Can you please briefly share what needs to be done for migrating to RFA 8.2? Especially for the processEvent method on Client and MarketDataSubscriber on Server.

    Your support will be greatly appreciated.

    Thank you.

  • Hi @wasin.w Thank you for clearing my doubts.

    And yes, I’m glad to confirm that I’ve successfully connected to Reuters and decoded the data using the RDMDictionary files and able to get the MARKET_PRICE.


    Now @Minh_Hoang let's start with your queries.
    Here are the key details and additional information regarding the RFA upgrade:

    Key Points to Note:

    1. SSL to RSSL Connection Migration:
      • The updated version does not support SSL connections.
      • You must configure an RSSL connection, which requires the following:
        • Provider's HOST
        • Provider's PORT
    2. OMM Layer Data Decoding:
      • To decode data in the OMM layer, you need to use RDMDictionary Files.
      • Additional details and implementation references can be found in above comments.
    3. Event Handling in processEvent Method:
      • My Implemented events:
        • CONNECTION_EVENTS
        • OMMITEM_EVENTS
      • Within OMMItemEvents, my logic focuses on handling the following MsgType values:
        • REFRESH_MSG
        • UPDATE_MSG
    4. Reference Resources:
      • I have implemented the upgradation by following tutorial class/code provided by RFA team only.
      • Key reference java files:
        • StartConsumer
        • LoginClient
        • ItemManager
  • Hi @wasin.w ,

    I 'm facing some problem.

    I'm getting empty values for RICs: EUR1M=BSAS, EUR2M=BSAS, EUR3M=BSAS, EUR6M=BSAS, EUR1Y=BSAS.
    I’m sharing to Reuters’s Request and Response for one of the RIC.

    Can you please confirm that request we have created correctly and response we are getting is correct.

    image-8641ab6998144-7f00.png

    image-b89e8f2970a06-8a13.png

    In the Response, we are expecting some values in BID and ASK fields, but we are getting the empty values for this RIC.

    Is there any reason that we are not receiving values for BID and ASK fields?

    Also few of RICs we are getting "RIC NOT FOUD". Can you please also mentioned the reason what could be the problem?

    image.png

    Thank You
    Bhavya Dudhia

  • Hello @bhavya.dudhia

    Please be informed that the answered question will not be monitored. Please post a new question next time.

    Empty Value Return

    The API just receives incoming data from the backend and sends it to an application "as is". It is possible that the backend sends an empty data to consumers.

    An application can use OMMData.isBlank() method to check if the data is blank.

    isblank.png

    Alternatively, you can enable the RSSL trace log messages to verify incoming data from the backend. The trace file contains all incoming/outgoing messages between the API and RTDS server.

    You can configure the following RFA Java configurations to enable the log file

    <namespace>/Connections/<Connection Name>/ipcTraceFlags = 7
    <namespace>/ Connections/<Connection Name>/mountTrace = True
    <namespace>/ Connections/<Connection Name>/logFileName=<path to log file>
    

    RIC Not Found

    The error message is returned from the service DTS. I am assuming that it connects to the ATS server. The error message is generated from the RTDS/ATS server. I strongly suggest you contact your local Market Data team to verify if the RIC name is valid of the RIC data is available on the ATS server.

  • Hi @Jirapongse,

    Thanks for your answer.

    And yes, problem is in service name only. We are using both Service name - DTS and IDN_RDF.

    But due to code error it's picking DTS only and that's the problem.
    Now It's working.

    Thanks!!