Error Handling
The connector applies different kinds of validations and error handling mechanisms like configuration validation, upstream connection tests and connection retries with graceful back-off.
The connector maps known exceptions to exception type ConnectException
, which can be handled by Kafka Connect accordingly.
Errors and warnings are logged using SLF4J, as described in section Logging.
The sink connector supports error handling using the Kafka Connect Reporter and can be configured to write erroneous records to a dead letter queue.
Configuration Validation
Single configuration parameter validation extending the Validator
class will throw exceptions of type ConfigException
in case of invalid configuration values. Additionally, the connector overrides the validate
method to validate interdependent configuration parameters and adds error messages to class ConfigValue
in case of any invalid parameter values. The corresponding parameters containing invalid values will be framed in red in the Confluent Control Center together with an appropriate error message.
Retry Mechanism
When the connector encounters connection or communication issues with the SAP® system, it uses a graceful backoff retry strategy to handle the situation. Here’s how it works:
-
Retry Attempts: The connector will try reconnecting a maximum number of times, which you can set using the
sap.adso.max.retries
property. -
Backoff Intervals: After each failed attempt, the connector pauses for a random duration. This pause is between the minimum and maximum values you set with
sap.adso.min.retry.backoff.ms
andsap.adso.max.retry.backoff.ms
. -
Exception Handling: Connection and communication issues are grouped into exception categories. You can configure which exception groups should trigger the backoff retry strategy using the
sap.adso.retry.exception.groups
property. For a complete list of exception groups, refer to the JCo JavaDocs forcom.sap.conn.jco.JCoException
.
Dead Letter Queue
The sink connector supports the Dead Letter Queue (DLQ) functionality.