JNDI CF Connection Parameters - Total Connection Attempts

Options
AllenW
AllenW Member Posts: 8 ✭✭

Hi Team,

I'm trying to get my head around the connect/reconnect properties configured inside a JNDI Connection Factory.

I found this this article useful: https://docs.solace.com/API/API-Developer-Guide/Configuring-Connection-T.htm#Sample

Just expanding on the example in the article, I'm trying to get a figure for the total amount of connection attempts made based of the JNDI CF parameters.

Based off that logic I'm trying to get an understanding of how many connection attempts we will see with the configuration we are currently using in one of our JNDI CFs

- 2 Hosts (Primary & Backup)
- 2 Connect Retry Attempts per Host
- 4 Connect Retry Attempts

The idea here is to get an idea of how many total connection attempts and furthermore the total time a connecting application will try to connect before becoming exhausted and no longer attempt to connect.

Did someone perhaps have a formula for this?

My best guess for when we are experiencing an outage that the total time of connection attempts will be something like:
= (Total Connection Attempts * Connect Timeout) + (Total Connection Attempts * Reconnect Retry Wait)

So, in our case this could be something like:
= (30 * 4,000) + (30 * 3,000)
= 210,000ms = 3.5 minutes?

Pretty confident this is completely wrong so if someone is able to share some documentation or input on this it would be greatly appreciated ☺️

Best Answer

  • RonInglesby
    RonInglesby Member, Employee Posts: 9 Solace Employee
    edited January 12 #2 Answer ✓
    Options

    Hi AllenW

    Initial Connection:

    Total Connection Attempts = 30

    Total Connection Intervals = 20

    Maximum initial connection time = (Total Connections Attempts * Connect Timeout ) + ( Total Connection Intervals s * Reconnect Retry Wait)

    Maximum initial connection time = (30 * 4s) + (20 * 3s) = 180s = 3 minutes

    Reconnection:

    Note that if attempting reconnection of a lost connection to a broker then "Reconnect Retry Attempts" (i.e. 3) is the value that is used rather than "Connect Retry Attempts" (i.e. 4)

    Total Connection Attempts will be 24

    Total Connection Intervals will be 16

    Maximum reconnection time = (Total Connections Attempts * Connect Timeout ) + ( Total Connection Intervals s * Reconnect Retry Wait)

    Maximum reconnection time = (24 * 4s) + (16 * 3s) = 144s = 2.4 minutes.

Answers

  • RonInglesby
    RonInglesby Member, Employee Posts: 9 Solace Employee
    edited January 12 #3 Answer ✓
    Options

    Hi AllenW

    Initial Connection:

    Total Connection Attempts = 30

    Total Connection Intervals = 20

    Maximum initial connection time = (Total Connections Attempts * Connect Timeout ) + ( Total Connection Intervals s * Reconnect Retry Wait)

    Maximum initial connection time = (30 * 4s) + (20 * 3s) = 180s = 3 minutes

    Reconnection:

    Note that if attempting reconnection of a lost connection to a broker then "Reconnect Retry Attempts" (i.e. 3) is the value that is used rather than "Connect Retry Attempts" (i.e. 4)

    Total Connection Attempts will be 24

    Total Connection Intervals will be 16

    Maximum reconnection time = (Total Connections Attempts * Connect Timeout ) + ( Total Connection Intervals s * Reconnect Retry Wait)

    Maximum reconnection time = (24 * 4s) + (16 * 3s) = 144s = 2.4 minutes.

  • AllenW
    AllenW Member Posts: 8 ✭✭
    edited January 12 #4
    Options

    Awesome, thanks a lot Ron. Help a lot.

    Answers my question - thank you!

This Month's Leaders