Error Handling

The RFC Connector applies different kind of validations and error handling mechanisms like configuration validation, offset recovery, upstream connection tests, connection retries with graceful back-off and repeatable source request extractions.

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.

Configuration Validation and Recommenders

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.

Graceful Backoff Retry Mechanism

When the connector encounters connection or communication issues with the SAP® system, it uses a retry backoff strategy to handle the situation. Here’s how it works:

  1. Retry Attempts: The connector will try reconnecting a maximum number of times, which you can set using the sap.rfc.max.retries property.

  2. 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.rfc.min.retry.backoff.ms and sap.rfc.max.retry.backoff.ms.

  3. 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.rfc.retry.exception.groups property. For more details, refer to the SAP JCo JavaDocs for com.sap.conn.jco.JCoException. You can also include BAPI return messages from any message class.