Error Handling
The OData Connectors apply different kinds of validations and error handling mechanisms like configuration validation, offset recovery, upstream connection tests, HTTP status checks and connection retries.
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 the source connector encounters connection or communication issues with the OData V4 service endpoint, it uses a graceful backoff retry strategy. Here’s how it works:
-
Retry Attempts: The connector will retry connecting a maximum number of times, which you can set using the
sap.odata.max.retries
property. -
Backoff Intervals: After each failed attempt, the connector will pause for a random amount of time. This pause is between the minimum and maximum durations specified by
sap.odata.min.retry.backoff.ms
andsap.odata.max.retry.backoff.ms
. -
Connection and Response Timeouts: For more control over the connection establishment and response wait times before retrying, use these properties:
sap.odata.connection.connect.timeout.ms
: Sets the timeout for establishing a connection.sap.odata.connection.read.timeout.ms
: Sets the timeout for waiting for a server response.
These settings help manage how the connector handles retries and timeouts when communicating with the OData service.
HTTP Status Checks and Retries
Repeating the request may be appropriate for certain HTTP response codes. The connector will retry the specified list of HTTP response codes.
# OData V4 retriable HTTP codes
sap.odata.retry.http.status.codes = 408,502,503,504
Dead Letter Queue
The sink connector supports the Dead Letter Queue (DLQ) functionality.