Error Handling
The IDoc Connectors apply different kinds of validations and error handling mechanisms like configuration validation, and connection retries with graceful backoff.
The connectors map 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.
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 there are connection or communication issues with the SAP® system, the connector uses a graceful backoff retry strategy to handle them. Here’s how it works:
-
Retry Attempts: You can set the maximum number of retry attempts using the
sap.idoc.max.retries
property. -
Backoff Intervals: After each failed attempt, the connector will pause for a random duration. This pause will be between the minimum and maximum times you specify with
sap.idoc.min.retry.backoff.ms
andsap.idoc.max.retry.backoff.ms
. -
Exception Handling: Connection and communication issues are categorized into exception groups. You can configure which exception groups should trigger the backoff retry strategy using the
sap.idoc.retry.exception.groups
property. For a complete list of these exception groups, refer to the JCo JavaDocs forcom.sap.conn.jco.JCoException
. You can also include BAPI return messages from any message class.
Dead Letter Queue
The sink connector supports the Dead Letter Queue (DLQ) functionality.