On 18/12/2019 10:42 am, Toralf Lund wrote:
On 18/12/2019 10:40, Gordon Sim wrote:
On 18/12/2019 8:45 am, Toralf Lund wrote:
I don't see any signs of connection errors or explicit reopens but
automatic reconnect with a limit has been enabled; the following
connect options are used
connection.setOption("reconnect", true);
connection.setOption("reconnect_limit", 0);
(I believe this means trying reconnect once, as "reconnect_limit"
specifies retries after an initial attempt.)
I believe a reconnect_limit of 0 will reconnect without any limit. If
you want to only reconnect once, you would specify a value of 1.
However that would I believe be reset every time it does successfully
reconnect.
I've assumed the following constructs in
ConnectionImpl::ConnectionImpl() mean that a value of 1 actually gives 2
attempts:
for (double i = minReconnectInterval; !tryConnect(); i =
std::min(i*2, maxReconnectInterval)) {
[ ... ]
if (limit >= 0 && retries++ >= limit) {
throw qpid::messaging::TransportFailure("Failed to connect
within reconnect limit");
}
[ ... ]
}
QPID_LOG(debug, "Connection successful, urls=" << asString(urls));
retries = 0;
(Notice how there is one tryConnect() before anything is checked, and
that limit check has >= and *post" increment of "retries".) But perhaps
I read that the wrong way?
No, you are right. What level of logging do you have on the client side?
Info level would have 'trying to connect' and 'connected to' messages.
The heartbeat firing logs only at debug level unfortunately from what I
can see.
Is there anything in your code that could be opening connections?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]