New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

question

Upvotes
Accepted
23 13 13 16

How to identify which update is for which RIC ?

Hi Dear developer:

1, Client is asking 2 RICs update as

CommandLine.addOption("itemName", "XAU9999=SGEX,XAU=", "List of items to open separated by ','.");

2, and he get below response, but in the next update the name of the RIC is not included in the response MESSAGE, under this condition he is asking how to identify the response is for which RIC ?

MESSAGE

Msg Type: MsgType.REFRESH_RESP
Msg Model Type: MARKET_PRICE
Indication Flags: REFRESH_COMPLETE | CLEAR_CACHE
Hint Flags: HAS_ATTRIB_INFO | HAS_ITEM_GROUP | HAS_PERMISSION_DATA | HAS_QOS | HAS_RESP_TYPE_NUM | HAS_SEQ_NUM | HAS_STATE
2018-01-24 10:31:35.926
State: OPEN, OK, NONE, "All is well"
Qos: (RT, JIT Filt.)
Group: 00030101569fb373
PermissionData: 0301016265c0 ( 0x03,0x01,0x01,0x62,0x65,0xc0 )
SeqNum: 46016
RespTypeNum: 0 (RespType.SOLICITED)
AttribInfo
ServiceName: ELEKTRON_DD
ServiceId: 257
Name: XAU9999=SGEX
NameType: 1 (RIC)
Payload: 1471 bytes
FIELD_LIST
FIELD_ENTRY 1/PROD_PERM: 6265
FIELD_ENTRY 2/RDNDISPLAY: 120
FIELD_ENTRY 3/DSPLY_NAME: 2018-01-24 10:31:35.928 profiles: default
GOLD AU9999
FIELD_ENTRY 4/RDN_EXCHID: (0)
FIELD_ENTRY 5/TIMACT:
FIELD_ENTRY 6/TRDPRC_1: 277.45
FIELD_ENTRY 7/TRDPRC_2: 277.50
FIELD_ENTRY 8/TRDPRC_3: 277.49
FIELD_ENTRY 9/TRDPRC_4: 277.50
FIELD_ENTRY 10/TRDPRC_5: 277.45
FIELD_ENTRY 11/NETCHNG_1: 0.31
FIELD_ENTRY 12/HIGH_1: 277.59
FIELD_ENTRY 13/LOW_1: 276.65

3: Next Response without RIC name:

MESSAGE
Msg Type: MsgType.UPDATE_RESP
Msg Model Type: MARKET_PRICE
Indication Flags:
Hint Flags: HAS_RESP_TYPE_NUM | HAS_SEQ_NUM
SeqNum: 4336
RespTypeNum: 0 (UNSPECIFIED)
Payload: 73 bytes
FIELD_LIST
FIELD_ENTRY 22/BID: 277.81
FIELD_ENTRY 30/BIDSIZE: 4
FIELD_ENTRY 436/BEST_BID1: 277.81
FIELD_ENTRY 437/BEST_BID2: 277.80
FIELD_ENTRY 438/BEST_BID3: 277.79
FIELD_ENTRY 439/BEST_BID4: 277.75
FIELD_ENTRY 440/BEST_BID5: 277.70
FIELD_ENTRY 730/BEST_BSIZ1: 4
FIELD_ENTRY 731/BEST_BSIZ2: 1653
FIELD_ENTRY 732/BEST_BSIZ3: 300
FIELD_ENTRY 733/BEST_BSIZ4: 1500
FIELD_ENTRY 734/BEST_BSIZ5: 500

BRs

Jessie

treprfarfa-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
9.6k 10 7 7

Hello @jessie.lin

An update can be identified is for which RIC in OMMAttribInfo.Name component of an update message. This component requires OMMMsg.Indication.ATTRIB_INFO_IN_UPDATES is set on the request as described in Table 45: MarketPrice Update Message of RDM USAGE GUIDE - JAVA EDITION(RFAJ_RDMUsageGuide.pdf) shown below:

The example source code to set OMMMsg.Indication.ATTRIB_INFO_IN_UPDATES in an item request:

//set ATTRIB_INFO_IN_UPDATES IndicationFlags to receive RIC in AttribInfo of update message
ommmsg.setIndicationFlags(OMMMsg.Indication.REFRESH | OMMMsg.Indication.ATTRIB_INFO_IN_UPDATES);

//Set RIC
ommmsg.setAttribInfo(serviceName, itemName, RDMInstrument.NameType.RIC);

// Set the message into interest spec
ommItemIntSpec.setMsg(ommmsg);

//make subscription for the RIc
Handle itemHandle = _mainApp.getOMMConsumer().registerClient(_mainApp.getEventQueue(),ommItemIntSpec, _marketPrice, null);

An example update message including the RIC name:

    Msg Type: MsgType.UPDATE_RESP
    Msg Model Type: MARKET_PRICE
    Indication Flags: DO_NOT_CONFLATE
    Hint Flags: HAS_ATTRIB_INFO | HAS_RESP_TYPE_NUM | HAS_SEQ_NUM
    SeqNum: 19486
    RespTypeNum: 0 (UNSPECIFIED)
    AttribInfo
        ServiceName: API_ELEKTRON_EPD_RSSL
        ServiceId: 4511
        Name: XAU=
        NameType: 1 (RIC)
    Payload: 149 bytes
        FIELD_LIST
            FIELD_ENTRY 3/DSPLY_NAME: LMAX         LON
            FIELD_ENTRY 5/TIMACT: 06:59
            FIELD_ENTRY 11/NETCHNG_1: 2.4100
            FIELD_ENTRY 17/ACTIV_DATE: 24 JAN 2018
            FIELD_ENTRY 22/BID: 1343.4200
            FIELD_ENTRY 23/BID_1: 1343.0600
            FIELD_ENTRY 25/ASK: 1343.5800

attribinfoname.png (9.1 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @jessie.lin

To get the RIC name in the AttribInfo of an update message, you can use:

OMMMsg.getAttribInfo().getName()

For example:

OMMItemEvent ie = (OMMItemEvent)event;
OMMMsg respMsg = ie.getMsg();
System.out.println("This is update of a ric named " + respMsg.getAttribInfo().getName());
//print data

An example output:

Upvote
426 2 4 4

Hi @jessie.lin

The most common practice is to pass the item name or RIC as enclosure object when calling the registerClient() method. For instance, we can modify the sendRequest() method in ItemManager.java file of the StarterConsumer example:

.
.
.
System.out.println(_className + ": Subscribing to " + itemName);
.
.
.
Handle itemHandle = _mainApp.getOMMConsumer().registerClient(_mainApp.getEventQueue(), ommItemIntSpec, this, itemName);

In the processEvent() method of the same itemManager.java file, simple call event.getClosure():

.
.
.
OMMItemEvent ie = (OMMItemEvent)event;
OMMMsg respMsg = ie.getMsg();
String itemName = (String) event.getClosure();
System.out.println("Item Name:" + itemName);
GenericOMMParser.parse(respMsg);
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.