Sidecar application used by Confluent for VS Code, as a local proxy for Confluent Cloud, Confluent Platform and local Kafka clusters, to help users build streaming applications.
Apache License 2.0
3
stars
3
forks
source link
FIX: Cache networking failures when fetching schemas from SR #132
Ensure we retry fetching schema from SR with a retry backoff mechanism -- only if an a networking related exception is encountered, or if we get back a "retryable" HTTP status code from SR.
If we still fail to fetch schema from SR after the retries, cache the failure so that we don't end up bombarding SR with a single request per record (for the same schema id). The fix made in the PR was to also cache exceptions that are instances of networking failure related exceptions.
In the consume resource method which returns a Uni: instead of eagerly constructing CompletionStage and then passing it the Uni.createFrom().completionStage, we pass a supplier instead so that the possibly-blocking construction operation of CompletionStage happens in the Quarkus worker thread (see @Blocking annotation on the method).
Any additional details or context that should be provided?
Pull request checklist
Please check if your PR fulfills the following (if applicable):
Tests:
[x] Added new
[x] Updated existing
[x] Deleted existing
[x] Have you validated this change locally against a running instance of the Quarkus dev server?
make quarkus-dev
[x] Have you validated this change against a locally running native executable?
make mvn-package-native && ./target/ide-sidecar-*-runner
Summary of Changes
Uni
: instead of eagerly constructingCompletionStage
and then passing it theUni.createFrom().completionStage
, we pass a supplier instead so that the possibly-blocking construction operation ofCompletionStage
happens in the Quarkus worker thread (see@Blocking
annotation on the method).Any additional details or context that should be provided?
Pull request checklist
Please check if your PR fulfills the following (if applicable):