For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 1 2 6

How does RTRSSLRTRecordService processes the serverList

I wanted to know the behavior of RTRSSLRTRecordService. How does it processes the serverList.
For instance i have serverList as : 192.168.107.132 192.168.107.133 192.168.107.130
How will it process this list.

elektronrefinitiv-realtimeelektron-sdksfc
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.

This question is monitored by Warat.

Upvotes
Accepted
4.4k 10 6 9

Yes, you will see a log in SSL.log for each fail connection.

But printing connected server require some work.

Right now, you probably doing something like this:

service = new RTRSSLRTRecordService(appId, servicename, "192.168.107.132 192.168.107.133");

In the above case, RTRSSLRTRecordService is creating and managing a RTRSSLConnection for you. RTRSSLConnection class encapsulates a connection to an upstream, and it allows you to add client for connection event.

But since you want to know the server that you have connected, you need to received connection event, which also means you have to create and manage RTRSSLConnection yourself.

connection = new RTRSSLConnection(appId, "sslDispatcher");
connection->userName("user");
connection->serverList("192.168.107.132 192.168.107.133");
connection->port(8101);
service = new RTRSSLRTRecordService(appId, servicename, *connection);

Instead of passing serverList, you have to create and pass RTRSSLConnection to RTRSSLRTRecordService. Then, you have to add a client to RTRSSLConnection and connect.

connection->addClient(*client);
connection->connect();

The client class must inherits RTRMDConnectionClient and implements

void processConnected(RTRMDConnection &)

and

void processNotConnected(RTRMDConnection &)

Finally, in processConnected, you can call RTRMDConnection.host() for host name.

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
4.4k 10 6 9

Hi @vsharma

The list is a failover list. SFC will process the list in order. When a connection to one of the server fail, SFC attempts to connect to the next server in the list.

But please note that failover only occurs when the connection to a server breaks. It do not occur when server reject login.

As a result, the redundant server in the list should have identical sets of user interests; i.e. user entitlements, available services(s), service capabilities, item availabilities, etc.

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
3 1 2 6

Hi @Warat B.
Thanks for the response here. Do we see the logs for this activity in the SSL.log file?
Also can you let me know how to print out the server that we have connected to in my application.

.

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.