How to establish multiple connections using RFA API

Is it possible for RFA API to establish multiple connections (to a same host but different ports ) ?
i.e.
Destination/publisher host:
Test_Host1
Ports:
- 10101
- 10102
..
- 10108
We have configured like below but it seems it just only connect to one of them :
===================
<?xml version="1.0" encoding="UTF-8"?>
<EmaConfig>
<ConsumerGroup>
<DefaultConsumer value="Consumer_1"/>
<ConsumerList>
<Consumer>
<Name value="Consumer_1"/>
<ChannelSet value="Channel_1, Channel_2"/>
<Logger value="Logger_1"/>
<Dictionary value="Dictionary_1"/>
<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"/>
<ConnectionPingTimeout value="30000"/>
<TcpNodelay value="1"/>
<Host value="test_host1"/>
<Port value="10101"/>
</Channel>
<Channel>
<Name value="Channel_2"/>
<ChannelType value="ChannelType::RSSL_SOCKET"/>
<CompressionType value="CompressionType::None"/>
<GuaranteedOutputBuffers value="5000"/>
<Host value="test_host1"/>
<Port value="10102"/>
</Channel>
</ChannelList>
</ChannelGroup>
<LoggerGroup>
<LoggerList>
<Logger>
<Name value="Logger_1"/>
<LoggerType value="LoggerType::Stdout"/>
<LoggerSeverity value="LoggerSeverity::Success"/>
</Logger>
</LoggerList>
</LoggerGroup>
<DictionaryGroup>
<DictionaryList>
<Dictionary>
<Name value="Dictionary_1"/>
<DictionaryType value="DictionaryType::FileDictionary"/>
<RdmFieldDictionaryFileName value="./RDMFieldDictionary"/>
<EnumTypeDefFileName value="./enumtype.def"/>
</Dictionary>
</DictionaryList>
</DictionaryGroup>
</EmaConfig>
===============================
Could you pleaes let us know how to properly configure it ? Thank you
Best Answer
-
Hello @ryusuke.kamimura
I did a quick test with EMA API C++ version 3.6.7 (RTSDK 2.0.7) Cons410 example connects to the following sources:
- Consumer 1: Connect to RTC/ADS Pop on my local machine port 14002
- Consumer 2: Connect to EMA Java IProvider on my local machine port 14022
The modification code of Cons410 is as follows:
try {
// Create two ConsumerManager objects to demonstrate horizontal scaling feature on user thread of control
ConsumerManager consumerMgr1( "localhost:14002", "user1" );
ConsumerManager consumerMgr2("localhost:14022", "user2");
AppClient appClient1;
AppClient appClient2;
consumerMgr1.getOmmConsumer().registerClient( ReqMsg().serviceName( "ELEKTRON_DD" ).name( "/VOD.L" ), appClient1, (void *)"consumerMgr1" );
consumerMgr2.getOmmConsumer().registerClient( ReqMsg().serviceName( "ELEKTRON_DD" ).name( "TRI.N" ), appClient2, (void *)"consumerMgr2" );
// Start dispatching messages from each ConsumerManager
consumerMgr1.start();
consumerMgr2.start();
sleep( 60000 ); // User thread calls onRefreshMsg(), onUpdateMsg(), or onStatusMsg()
consumerMgr1.stop();
consumerMgr2.stop();
}Results:
The EMA API Horizontal Scaling example is available on the EMA C++ as Cons410 example. The example is available on the SDK package which can be downloaded from the following sites:
0
Answers
-
Hello @ryusuke.kamimura
Thank you for contacting us. Can you please clarify if you are using the RFA API (C++, Java, or . Net?) or EMA API (C++ or Java)?
If you are using EMA API, the API doesn't support multiple hosts. However, you can use the Warm Standby feature. This feature allows a consumer to failover to a standby connection when a primary connection fails or a service is down. Because the standby server is already aware of items an application has subscribed for, during a failover APIs don't need to re-subscribe items to the standby server.
You can find more detail about the RTSDK Warm Standby feature from the following resources:
- Introduction to Refinitiv Real-Time SDK Warm Standby Feature
- How to Run Refinitiv Real-Time SDK C/C++ Warm Standby Example (Note: The article is based on RTSDK C/C++, but the concept should be the same as RTSDK Java)
The EMA APIs examples for the Warm Standby feature are as follows:
- EMA C++: Cons470
- EMA Java: ex470_MP_WarmStandby
Hope this helps.
0 -
You are asking about RFA, but the configuration you have posted is for EMA SDK.
Either way, there is no automatic mechanism to establish multiple connections to ADS, but an application can easily do this in the code. It does not even have to be a different IP/port; multiple connections can be established to the same ADS by instantiating a new OMMConsumer object. Each consumer will establish its own independent connection, which is unaffected by other connections.
In practice, multiple connections to same host do not offer any advantage, since a single connection has enough bandwidth to handle all the throughput - what is your use case?
0 -
Many thanks for your reply.
This is not a connection to TREP/ADS, but to an internally created publisher server that runs multiple instances (and each instance provides unqiue subset of RICs) which each instance maps to a unique port. hence this query.
Is there any way we can do this ? other than having to preparea new host per instance /port ?
0 -
Hello @ryusuke.kamimura
The EMA API supports only a single host server (ADS or OMM IProvider) connection per OMMConsumer object. The channellist and warm standby are for the failover scenario.
There is the EMA API Horizontal Scaling example (EMA Java: ex410_MP_HorizontalScaling, EMA C++:Cons410) that shows how the single application can utilize multiple OMMConsumer objects. This article aims for the horizontal scaling feature but you can modify it to connect to different sources or ports.
If you need this feature in the future release of the SDK, you can submit an enhancement request to the product team via the following channels:
0 -
Hello @wasin.w
Thank you for your reply.
So just to confirm,
it is possible to connect to different ports by using "EMA API Horizontal Scaling" feature that is already made available, correct ?
Our developer is using EMA API (C++),
could you please share us with the doc/sample config for it ?
Thank you.
0 -
@wasin.wHi
Many thanks for your quick test and confirmation. Let us give a try on our side and get back if any further questions.
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 33 Data Model Discovery
- 682 Datastream
- 1.4K DSS
- 613 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.8K Refinitiv Data Platform
- 622 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 83 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛