Class RetriableConnection

java.lang.Object
io.debezium.storage.jdbc.RetriableConnection
All Implemented Interfaces:
AutoCloseable

public class RetriableConnection extends Object implements AutoCloseable
Class encapsulates a java.sql.Connection. It provides executeWithRetry method to execute code snippet that interacts with the connection. If that fails with SQLRecoverableException, it will try to re-create new connection and perform the complete code snippet again (first, it performs rollback if specified in params). It attempts to reconnect number of times as specified in io.debezium.storage.jdbc.JdbcCommonConfig.PROP_MAX_RETRIES and there is a delay in between per io.debezium.storage.jdbc.JdbcCommonConfig.PROP_WAIT_RETRY_DELAY The code snippet provided should handle commit of its own if required. The connection is marked as autocommit = false
Author:
Jiri Kulhanek