Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-1899

Qpid proton reconnect_options.max_attempts is not inline with Qpid JMS failover.maxReconnectAttempts

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: proton-c-0.22.0
    • Fix Version/s: None
    • Component/s: cpp-binding
    • Labels:
      None

      Description

      In Qpid JMS, the default value of failover.maxReconnectAttempts is -1, meaning it will retry indefinitely.

      In Qpid Proton, the default is also to retry indefinitely, however, the default value of reconnect_options.max_attempts is 0.

      I understand that conforming to JMS is perhaps not priority.

      However, for me, the problem arises when I want to have failover without necessarily retrying.

      With 0 being the no limit to retry and being the default value, there is no way (I can forsee) I can tell proton not to retry, but to failover. What I would expect with failover and no retry is the following behavior: 

      • Proton tries to connect to the connect URL
      • If it fails, it loops over the failover url's once, until it either succeeds to connect or it fails

      With the current way things are done, I am obliged to retry at least once, repeating the above scenario twice. I tested this by putting no failover URLs, and specifying a max_attempts of 1. Proton tries to connect twice to the connect URL.

      Perhaps there is a way around this with the current API, however, I couldn't find it.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jeremy.aouad Jeremy
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: