Package io.debezium.pipeline
Class ErrorHandler
java.lang.Object
io.debezium.pipeline.ErrorHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CommonConnectorConfigprivate static final org.slf4j.Loggerprivate intprivate final AtomicReference<Throwable>private final ChangeEventQueue<?>private intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionErrorHandler(Class<? extends org.apache.kafka.connect.source.SourceConnector> connectorType, CommonConnectorConfig connectorConfig, ChangeEventQueue<?> queue, ErrorHandler replacedErrorHandler) -
Method Summary
Modifier and TypeMethodDescriptionintprotected booleanWhether the maximum number of retries has been reachedprotected booleanisCustomRetriable(Throwable throwable) Whether the given non-retriable matches a custom retriable setting.protected booleanisRetriable(Throwable throwable) Whether the given throwable is retriable (e.g.voidvoidsetProducerThrowable(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()
-