Package io.debezium.pipeline
Class ErrorHandler
java.lang.Object
io.debezium.pipeline.ErrorHandler
-
Field Summary
Modifier and TypeFieldDescriptionprivate final CommonConnectorConfig
private static final org.slf4j.Logger
private int
private final AtomicReference<Throwable>
private final ChangeEventQueue<?>
private int
static final int
static final int
-
Constructor Summary
ConstructorDescriptionErrorHandler
(Class<? extends org.apache.kafka.connect.source.SourceConnector> connectorType, CommonConnectorConfig connectorConfig, ChangeEventQueue<?> queue, ErrorHandler replacedErrorHandler) -
Method Summary
Modifier and TypeMethodDescriptionint
protected boolean
Whether the maximum number of retries has been reachedprotected boolean
isCustomRetriable
(Throwable throwable) Whether the given non-retriable matches a custom retriable setting.protected boolean
isRetriable
(Throwable throwable) Whether the given throwable is retriable (e.g.void
void
setProducerThrowable
(Throwable producerThrowable) private boolean
-
Field Details
-
RETRIES_UNLIMITED
public static final int RETRIES_UNLIMITED- See Also:
-
RETRIES_DISABLED
public static final int RETRIES_DISABLED- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
queue
-
producerThrowable
-
connectorConfig
-
maxRetries
private int maxRetries -
retries
private int retries
-
-
Constructor Details
-
ErrorHandler
public ErrorHandler(Class<? extends org.apache.kafka.connect.source.SourceConnector> connectorType, CommonConnectorConfig connectorConfig, ChangeEventQueue<?> queue, ErrorHandler replacedErrorHandler)
-
-
Method Details
-
setProducerThrowable
-
getProducerThrowable
-
communicationExceptions
-
isRetriable
Whether the given throwable is retriable (e.g. an exception indicating a connection loss) or not. By default only I/O exceptions are retriable -
isCustomRetriable
Whether the given non-retriable matches a custom retriable setting.- Returns:
- true if non-retriable is converted to retriable
-
hasMoreRetries
protected boolean hasMoreRetries()Whether the maximum number of retries has been reached- Returns:
- true if maxRetries is -1 or retries < maxRetries
-
unlimitedRetries
private boolean unlimitedRetries() -
getRetries
public int getRetries() -
resetRetries
public void resetRetries()
-