Is there any way to limit my incoming payload on basis of fid in RefreshMsg java construct in EMA ,e

Is there any way to limit my incoming payload on basis of fid in RefreshMsg java construct in EMA ,eg I just want Bid(fid : 22) and ask(fid : 25) value for an data item or RIC.

Best Answer

  • Hello @rkumar

    You can use Views feature to limit incoming payload of Refresh and Update messages containing only your preference fids. Using a view, a consumer requests a subset of fields. Then, only the requested fields are sent to EMA application as the diagram shown below:

    image

    For more details, please refer to Section 3.2.3 Views in API Concept Guide

    Note: ADS supports only field numbers(field names are not supported) and Level 1 data(Market Price) domain for Views feature.

    You can find the example of using Views feature in consumer.series300.example360__MarketPrice__View application shipped with Elektron SDK Java package. The example output running the application to request fid no.22(BID) and no.25(ASK):

    image

    Hope this help.

Answers

  • @rkumar

    One aspect of using views that sometimes surprises: you may see update messages but the fields have not changed value.

    This can happen when an update message contains a change to a field value that is not in your view but the message also includes a field that is in your view (but its value has not changed): e.g.:

    View : FID 22(BID), FID 25(ASK)

    A full update might include: BID= 236.95, BIDSIZE= 11396

    Application receives update : BID=236.95

    because BID is in the view specification:

    Subsequent update includes: BID=236.95, BIDSIZE=9696

    Application receives another update : BID=236.95

    because BID is in the view specification but the value is the same.

  • is there any proper documentation about EmaFactory ,OmmArray and EmaRdm and other utility classes to use them as per requirement . i basically want to use view and batch functionality .i took help from elektron sdk but its not exactly what i want .

  • @rkumar There are EMA tutorials and online API documentation at: https://developers.thomsonreuters.com/elektron/elektron-sdk-java/learning

    For EMA Java, if you click on Documentation -> expand Development -> "Message API - Java: Development and Configuration Guides with Examples" it will launch the doc bundle. Within the bundle, expand the Java Reference Manual to launch the JavaDoc for API.

    Easiest mechanism would be to look at code sample in:

    example360__MarketPrice__View

    and

    example370__MarketPrice__Batch

    bundled with EMA SDK.

  • @Gurpreet. thanks . this would help . in case i have any further query i'll ask. thanks again .