question

Upvotes
Accepted
321 1 0 9

用RFA订阅超过一个Ric代码,返回的更新属于哪个代码?

Hi,

我跟着教程学习使用RFA Java订阅RIC代码。

我尝试订阅2个RIC代码(假设是A和B),我发现能成功返回两个RIC代码的更新消息。

但是我只在“REFRESH_RESP”这里看到有显示RIC代码的名称(这估计是第一次返回的全量数据?),没在 "UPDATE_RESP" 这里显示:

================================

Msg Type: MsgType.REFRESH_RESP

Msg Model Type: MARKET_PRICE

...

Name: EURCAD=

NameType: 1 (RIC)

Payload: 2029 bytes

================================

Msg Type: MsgType.UPDATE_RESP

Msg Model Type: MARKET_PRICE

Indication Flags: DO_NOT_CONFLATE

Hint Flags: HAS_RESP_TYPE_NUM | HAS_SEQ_NUM

...

RespTypeNum: 0 (UNSPECIFIED)

Payload: 223 bytes

================================

所以,当返回的数据都只是"UPDATE_RESP"的时候,我怎么知道返回的数据是属于哪个RIC代码的呢?是A还是B?谢谢!

treprfa-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.

Hello @ivy.cao2020

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS


Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

Upvote
Accepted
321 1 0 9

因此,应用程序需要维护一个handle和条目(item) 的映射。

或者,如果想在更新消息中获得RIC名称,你可以在OMM请求消息中设置OMMsg.Indication.ATTRIB_INFO_IN_UPDATES,如下所示:

1656585714314.png

有了这个标志,更新信息将有相关的RIC代码名称:

1656585789221.png

然而,RFA Java是一个传统老旧的API。如果你想开始开发一个新的应用程序,建议使用 Refinitiv Real-Time SDK - Java (EMA Java) 来代替。Enterprise Message API(EMA)是一个开源的、数据中立的、多线程的、易于使用的API,提供对OMM和RWF数据的访问。它能够检索与RFA Java相同的内容。


1656585714314.png (16.1 KiB)
1656585789221.png (28.5 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.

Upvote
321 1 0 9

RFA Java用Handles来唯一标识订阅的数据条目。

当订阅一条数据的时候,你可以从registerClient得到这条数据的handle。

1656585418736.png


当使用批处理请求时,你也可以从processEvent回调函数中的event.getHandle()获得一条数据的Handle。更多信息,请参考RFA包中的com.reuters.rfa.example.omm.batchviewcons例子。

1656585435040.png


1656585418736.png (12.4 KiB)
1656585435040.png (17.7 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.

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.