s the only way to implement auto-reconnection failover to set an exception listener to listen for connection exceptions, then when you detect one, to close the connection properly then re-connect by opening the connection again?yes, that's the idea.
Is there a fix in the event that a connection silently fails and an exception is not thrown immediately? For example, a way to ping the connection or have keep-alive messages to know when the connection goes down, then re-open the connection, using the given C-API? Or do we have to write our own abstract API on top of this?If the connection is broken the connection exception listener will be called; if the connection becomes half-open due to network problem, the C-API runtime automatic ping (if no network traffic otherwise in the client), will trigger underline TCP layer to close the TCP connection (which in turn causes connection listener to be called) after a system configurable period (TCP layer parameter).
Also, will all of this work in a clustering capactiy with a composite URL?The C-API currently supports specifying broker host name and port number on creating a connection, so the application can keep a list of broker hostnames/ports and control which broker to connect on each MQCreateConnection call.