If the user specifies the option failover='singlebroker' in the connection URL, a coding error in FailoverPolicy.java means that the client actually elects to use FailoverRoundRobinServers policy rather than FailoverSingleServer.
For example, the following URL will cause the client to use the round-robin policy.
Furthermore, as the logic FailoverRoundRobinServers.getNextBrokerDetails means that if the roundrobin policy is used with a brokerlist containing one broker, connectdelay is never applied, this defect also means that if a user passes failover='singlebroker' with a broker list containing one entry, connectdelay is ignored. This can give the appearance that server reconnection is broken as the client can spin through thousands of retries before then broker has chance to restart.
To workaround this issue, the user can omit the failover option from the URL and let the defaulting within FailoverPolicy class choose FailoverSingleServer if the brokerlist contains one entry, or FailoverRoundRobinServers if the list contains more than one.
Client will default to singlebroker policy:
Client will default to roundrobin policy: