[ https://issues.apache.org/jira/browse/PROTON-1899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeremy updated PROTON-1899: --------------------------- Description: In Qpid JMS, the default value of [failover.maxReconnectAttempts|https://qpid.apache.org/releases/qpid-jms-0.11.1/docs/index.html#failover-configuration-options] 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|https://qpid.apache.org/releases/qpid-proton-0.22.0/proton/cpp/api/classproton_1_1reconnect__options.html#a7e6b1a75735da02638374a317a232428] 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, couldn't find it. was: In Qpid JMS, the default value of [failover.maxReconnectAttempts|https://qpid.apache.org/releases/qpid-jms-0.11.1/docs/index.html#failover-configuration-options] 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|https://qpid.apache.org/releases/qpid-proton-0.22.0/proton/cpp/api/classproton_1_1reconnect__options.html#a7e6b1a75735da02638374a317a232428] 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 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, couldn't find it. > Qpid proton reconnect_options.max_attempts is not inline with Qpid JMS > failover.maxReconnectAttempts > ---------------------------------------------------------------------------------------------------- > > Key: PROTON-1899 > URL: https://issues.apache.org/jira/browse/PROTON-1899 > Project: Qpid Proton > Issue Type: Improvement > Components: cpp-binding > Affects Versions: proton-c-0.22.0 > Reporter: Jeremy > Priority: Major > > In Qpid JMS, the default value of > [failover.maxReconnectAttempts|https://qpid.apache.org/releases/qpid-jms-0.11.1/docs/index.html#failover-configuration-options] > 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|https://qpid.apache.org/releases/qpid-proton-0.22.0/proton/cpp/api/classproton_1_1reconnect__options.html#a7e6b1a75735da02638374a317a232428] > 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, couldn't > find it. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org