private static void checkValidAlternative ( List < ClientConfig > alternativeClientConfigs ) { if ( alternativeClientConfigs . isEmpty ( ) ) { throw new InvalidConfigurationException ( "ClientFailoverConfig should have at least one client config." ) ; } ClientConfig mainConfig = alternativeClientConfigs . get ( 0 ) ; for ( ClientConfig alternativeClientConfig : alternativeClientConfigs . subList ( 1 , alternativeClientConfigs . size ( ) ) ) { checkValidAlternative ( mainConfig , alternativeClientConfig ) ; } }
For a client to be valid alternative all configurations should be equal except GroupConfig SecurityConfig Discovery related parts of NetworkConfig Credentials related configs