EMA consultant
Hi Team,
one of client raised bellow questions about EMA, pls help answer. thx
通信机制:
1、如果ChannelType选择 RSSL_SOCKET:
- Channel中CompressionType配置项的作用是什么?推荐怎么配置?
- Channel中DirectWrite配置项推荐怎么配置?
- Channel中TcpNodelay配置项推荐怎么配置?
2、从文档和例子中看,<Host>标签并没有配置多个地址,且<Host>标签和<Port>是配合使用的,那么如果配置两个ADS的IP,是这种方式 “ <ChannelSet value="Channel_1, Channel_2"/> ”, 还是这种方式 “ <Host value="localhost1, localhost2"/> ”
通信流程:
1、Domain Model中Market Price Request 和 Batch Request / Snapshot Request 它们都是属于行情请求,之间有什么关系吗?每种请求都可以单独发送/接收吗?
2、根据行情请求的特性,是否可以这样理解:
- Streaming Requests:一次请求,订阅一个RIC,持续推送
- Snapshot Request:一次请求,订阅一个RIC,一次反馈
- Batch Request:一次请求,订阅一批RIC,持续推送
- Views:一次请求,订阅一个RIC中某几个字段域,持续推送
3、消费者向外部发送消息时一般会用到 ReqMsg / PostMsg / GenericMsg 三种消息类型,这三种消息有什么区别?
4、Private Streams 和 Streaming Request / Snapshot Request 是什么关系?发出的请求可以设置是否是私有流吗?
5、privateStream的默认值是false吗?
6、Private Streams / Tunnel Streams 是什么关系?什么场景下需要开启 Private Streams / Tunnel Streams ?
Gang Chen
Best Answer
-
Hello @gang.chen1
I have translated the question using Goole translate, but I am not sure if it is correct.
Question 1: What is the function of the CompressionType configuration item in Channel? What is the recommended configuration?
How to configure the DirectWrite configuration item in Channel?
What is the recommended configuration for the TcpNodelay configuration item in the Channel?
Answer:
The CompressionType configuration is for setting a message compression between the API and server. The supported values are as follows:
- None (Default)
- ZLib
- LZ4
The compression type and compression level must be supported on the server side too. I highly recommend the client contact their Market Data team to verify their RTDS server configurations.
About the "DirectWrite" and "TcpNodelay" recommendations, there is no golden number suggestion. I recommend the client test each setting value to find the one that matches their requirements.
Question 2: From the documentation and examples, the <Host> tag is not configured with multiple addresses, and the <Host> tag and <Port> are used together, then if the IPs of two ADSs are configured, this is the way" <ChannelSet value="Channel_1, Channel_2"/> ", or this way " <Host value="localhost1, localhost2"/> "
Answer: The client can set multiple hosts/IPs with the ChannelSet configuration.
- Host 1 in Channel_1
- Host 2 in Channel_2
- Then set Consumer's ChannelSet to Channel_1 and Channel_2
Example:
<ConsumerGroup>
<ConsumerList>
<Consumer>
<Name value="Consumer_2"/>
<!-- ChannelSet specifies an ordered list of Channels to which OmmConsumer will attempt to -->
<!-- connect, one at a time, if the previous one fails to connect -->
<ChannelSet value="Channel_1, Channel_2"/>
<Dictionary value="Dictionary_2"/>
<XmlTraceToStdout value="0"/>
</Consumer>
</ConsumerList>
</ConsumerGroup>
...
<ChannelGroup>
<ChannelList>
<Channel>
<Name value="Channel_1"/>
<ChannelType value="ChannelType::RSSL_SOCKET"/>
<CompressionType value="CompressionType::None"/>
<GuaranteedOutputBuffers value="5000"/>
<TcpNodelay value="1"/>
<Host value="localhost1"/>
<Port value="14002"/>
</Channel>
<Channel>
<Name value="Channel_2"/>
<ChannelType value="ChannelType::RSSL_SOCKET"/>
<CompressionType value="CompressionType::None"/>
<GuaranteedOutputBuffers value="5000"/>
<TcpNodelay value="1"/>
<Host value="localhost2"/>
<Port value="14002"/>
</Channel>
</ChannelList>
</ChannelGroup>1
Answers
-
Hello @gang.chen1
Before I continue, I highly recommend the client check the following resources that might help them understand the Refintiv Real-Time and RTSDK betters:
- 10 important things you need to know before you write a Refinitiv Real-Time application article that gives all the basic detail about the Refinitiv Real-Time concept for the client.
- EMA API step-by-step tutorials (Java, C/C++)
Communication process:
Question 1. Market Price Request and Batch Request / Snapshot Request in Domain Model are all market requests. Is there any relationship between them? Can each request be sent/received individually?
Answer: The normal request message, batch request, and snapshot request message are types of the request message that the API sends to the server. There is no relationship between them and the API can send-receive each request individually.
Question 2: According to the characteristics of the market request, can it be understood as follows:
- Streaming Requests: One request, one RIC subscription, continuous push
- Snapshot Request: One request, one RIC subscription, one feedback
- Batch Request: One request, subscribe to a batch of RICs, and push continuously
- Views: One request, subscribe to certain fields in a RIC, and push continuously
Answer: The client's understanding is correct. Please note that the Batch and View requests can be used together too.
Example:
consumer = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig().host("localhost:14002").username("user"));
//Batch
OmmArray arrayBatch = EmaFactory.createOmmArray();
arrayBatch.add(EmaFactory.createOmmArrayEntry().ascii("FB.O"));
arrayBatch.add(EmaFactory.createOmmArrayEntry().ascii("CSCO.O"));
//View
OmmArray arrayView = EmaFactory.createOmmArray();
arrayView.fixedWidth(2);
arrayView.add(EmaFactory.createOmmArrayEntry().intValue(22)); //BID
arrayView.add(EmaFactory.createOmmArrayEntry().intValue(25)); //ASK
//ElementList
ElementList batchView = EmaFactory.createElementList();
batchView.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, arrayBatch));
batchView.add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_VIEW_TYPE, 1));
batchView.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_VIEW_DATA, arrayView));
consumer.registerClient(EmaFactory.createReqMsg().serviceName("ELEKTRON_DD").payload(batchView), appClient);Question 3: When consumers send messages to the outside world, they generally use three message types: ReqMsg / PostMsg / GenericMsg. What is the difference between these three messages?
- ReqMsg: Request Message. The application sends this message to the server to request something.
- PostMsg: Post Message. The application sends this message to the server to push content upstream. The upstream can be that RTDS Server, ATS, or even Refinitiv Real-Time (through RCC).
- GenericMsg: Generic Message, a bi-directional message without any implicit interaction semantics associated with it, hence the name generic. It is used by some customized data domains for a specific purpose.
1 -
Hello @gang.chen1
Question 4: What is the relationship between Private Streams and Streaming Requests/Snapshot Requests? Can the made request be set to be a private stream?
Answer: A private stream is a stream that contains data this is not to be aggregated, stored, or recovered by the infrastructure (i.e. RTDS). Data exchanged on private streams are exclusively between only two endpoints; Provider and Consumer and have not been shared with other Consumers or Providers.
This virtual private connection can be either a direct connection, through the RTDS, or via a cascaded set of platforms.
All types of requests, functionality, and Domain Models can flow across a private stream including (but not limited to):
- Streaming Requests
- Snapshot Requests
- Posting
- Generic Messages
- Batch Requests
- Views
- All Refinitiv Domain Models & Custom Domain Models
Question 5: Is the default value of privateStream false?
Answer: The request message is not a private stream by default. The application can set the ReqMsg.privateStream() to enable a private stream.
Please note that the Provider application needs to support a private stream too.
Example from EMA ex220_MBP_PrivateStream example.
consumer.registerClient(EmaFactory.createReqMsg().domainType(EmaRdm.MMT_MARKET_BY_PRICE)
.serviceName("DIRECT_FEED").name("BBH.ITC")
.privateStream(true), appClient);Question 6: What is the relationship between Private Streams / Tunnel Streams? In what scenarios do I need to enable Private Streams / Tunnel Streams?
Answer: A tunnel stream is a private stream with additional behaviors, such as end-to-end line of sight for authentication and guaranteed delivery.
The normal streaming consumer applications with the deployed RTDS connection scenario do not use Private Stream and Tunnel Stream.
- In general, the use case of the private stream is to allow the provider and consumer to target content to one another directly. The content can be only specific for only a user/client; for example, only data that a user has permission to access.
- The Tunnel Stream is currently used when connecting the consumer application to the Refinitiv Real-Time over secure internet such as Refinitiv Real-Time -- Optimized (RTO) or Refinitiv Real-Time Contribution (RCC).
Hope this helps.
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛