Connection Recovery
This must be performed in the ExceptionListener callback. The recover connection method blocks until the connection (and its related objects, including sessions, producers, and consumers) are fully recreated, or until it has failed in all its attempts to recreate these objects.
As long as the unshared state client has a valid connection, the API behaves the same as the standard EMS client. However, when the unshared state client’s connection is broken, the API performs as follows:
- Methods called inside a MessageListener callback immediately return a Java exception or C status of TIBEMS_SERVER_NOT_CONNECTED.
- Methods called elsewhere block until the connection is valid again.
Note that the connection is considered broken from the point where the underlying TCP/SSL connection fails, and until recoverConnection or tibemsConnectionFactory_RecoverConnection successfully returns.
Copyright © 2021. Cloud Software Group, Inc. All Rights Reserved.