RFA Consumer ads connection hop

Lalit
Lalit Newcomer
edited March 11 in RFA

I have a rfa ommconsumer which is connecting to two services. One of service is goes down but this service is available at other ads so how to hop to other ads in this case. Consumer was consuming multiple symbols data. what should be sequence of event I need to follow. Is there simple example available for this.

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Lalit

    Thank you for reaching out to us.

    Please clarify the scenario.

    image.png

    In my understaning, RFA Consumer connects to ADS1 and subcribe to items (item1 and item2) from the Service A and Service B, respectively.

    Then, the Service B on ADS 1 is down but the Service A is still up. RFA is still connecing to ADS 1.

    How RFA can connect to ADS 2 and subscibe to the Service B?Is this the question?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Lalit

    To do this, you need to use the ConnectionList and Service Group.

    The configurations will look like this:

    \Sessions\Session1\connectionList					= "Connection_RSSL,Connection_RSSL1"
    \Sessions\Session1\serviceGroupList = "SG2"
    \ServiceGroups\SG2\serviceList = "S1,S2"
    
    \Connections\Connection_RSSL\connectionType					= "RSSL"
    \Connections\Connection_RSSL\rsslPort 						= "14002"
    \Connections\Connection_RSSL\hostName						= "127.0.0.1"
    \Connections\Connection_RSSL\serviceList = "S1"
    \Services\S1\feedName = "DIRECT_FEED"
    
    \Connections\Connection_RSSL1\connectionType					= "RSSL"
    \Connections\Connection_RSSL1\rsslPort 						= "14010"
    \Connections\Connection_RSSL1\hostName						= "127.0.0.1"
    \Connections\Connection_RSSL1\serviceList = "S2"
    \Services\S2\feedName = "DIRECT_FEED"
    
    
    

    With these configuations, RFA will establish connections to both Connection_RSSL and Connection_RSSL1 when using the Session1.

    The concrete DIRECT_FEED service on Connection_RSSL will be mapped to S1.
    The concrete DIRECT_FEED service on Connection_RSSL1 will be mapped to S2.

    S1 and S2 are grouped to the SG2 service.

    Then, the application will subscribe to the SG2 service instead of DIRECT_FEED. Therefore, when the DIRECT_FEED on the Connection_RSSL is down, RFA will subscribe to the DIRECT_FEED on the Connection_RSSL1.

    For more information, please refer to the RFA Developes Guide and RFA Configuration Guide.

  • Lalit
    Lalit Newcomer
    edited March 12

    Sorry, I am not able to understand the configuration fully to map to my case.
    Here is the configuration which I am using.

    \Connections\Connection1_RSSL\connectionType = "RSSL"
    \Connections\Connection1_RSSL\rsslPort = "4444"
    \Connections\Connection1_RSSL\serverList="ads1 ads2 ads3 ads4"
    \Connections\Connection1_RSSL\serverSelectionOrder= true
    \Connections\Connection1_RSSL\serviceList = "SERVICE1"
    \Connections\Connection1_RSSL\requestTimeout = 5000
    \Sessions\Session1\connectionList = "Connection1_RSSL"

    \Connections\Connection2_RSSL\connectionType = "RSSL"
    \Connections\Connection2_RSSL\rsslPort = "5555"
    \Connections\Connection2_RSSL\serverList="ads11 ads22 ads33 ads44"
    \Connections\Connection2_RSSL\serverSelectionOrder= true
    \Connections\Connection2_RSSL\serviceList = "SERVICE2"
    \Connections\Connection2_RSSL\requestTimeout = 5000
    \Sessions\Session2\connectionList = "Connection2_RSSL"

    for the above configuration, ads1,ads2,ads3,ads4 have service SERVICE1 and
    ads11 ads22 ads33 ads44 have service SERVICE2 My use case is that I want to improve resiliency. Consumer is connecting to both services and If SERVICE1 service went down and consumer was connected to ads1 for getting SERVICE1 so in case of failure of this service. how consumer will connect to some other ads server.

    please note that I am having two sessions for different services.

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    From the attached configuration, each session has one connection and each connection uses the serverList configuration.

    The serverList configuration supports failover. RFA will failover to the next server if the connection to the current server is down. As far as I know, it will not failover to the next server if the service is down and the connection is still connected. Therefore, the serverList can provide connection resiliency.

    RFA also supports connectionList and service group. The service group can provide service resiliency. For example:

    \Sessions\Session1\connectionList					= "Connection_RSSL,Connection_RSSL1"
    \Sessions\Session1\serviceGroupList = "SG2"
    \ServiceGroups\SG2\serviceList = "S1,S2"

    \Connections\Connection_RSSL\connectionType = "RSSL"
    \Connections\Connection_RSSL\rsslPort = "14002"
    \Connections\Connection_RSSL\hostName = "127.0.0.1"
    \Connections\Connection_RSSL\serviceList = "S1"
    \Services\S1\feedName = "DIRECT_FEED"

    \Connections\Connection_RSSL1\connectionType = "RSSL"
    \Connections\Connection_RSSL1\rsslPort = "14010"
    \Connections\Connection_RSSL1\hostName = "127.0.0.1"
    \Connections\Connection_RSSL1\serviceList = "S2"
    \Services\S2\feedName = "DIRECT_FEED"

    The connection diagram looks like this:

    image.png

    With these configuations, RFA will establish connections to both Connection_RSSL and Connection_RSSL1 when using the session1.

    S1 is an alias name of the concrete DIRECT_FEED service on Connection_RSSL.
    S2 is an alias name of the concrete DIRECT_FEED service on Connection_RSSL1.

    S1 and S2 are grouped to the SG2 service group.

    Then, the application will subscribe to the SG2 service instead of DIRECT_FEED. Therefore, when the DIRECT_FEED on the Connection_RSSL is down, RFA will subscribe to the DIRECT_FEED on the Connection_RSSL1.