-
Notifications
You must be signed in to change notification settings - Fork 697
Description
Hi,
We use the Schema Registry API to register schemas or retrieve schema IDs from the Schema Registry server, but we’ve found that the register API does not retry according to our configured retry settings.
From inspecting the code in the Schema Registry client (around this location: schemaregistry/internal/rest_service.go at Confluent’s confluent-kafka-go repository) it appears that the retry logic only triggers when the server returns an HTTP status code. That means the client recognizes certain HTTP response codes (e.g., 5xx) and applies retry behavior based on the configured backoff and max.retries values.
| resp, err = rs.Do(req) |
However, if a network-level error occurs before any HTTP response is received, such as:
dial tcp: lookup psrc-4xrp1.eu-central-1.aws.confluent.cloud: i/o timeout
then the Schema Registry API does not retry, even though retries are configured. In these cases the underlying HTTP request never completes, so the code never enters the branch where retry decisions are made based on response status.
Because of this behavior, dial timeout or DNS lookup errors do not count as retryable conditions in the current implementation, so the client exits without retrying.
Do you think this constitutes a bug in the retry logic?