bbejeck commented on code in PR #20661:
URL: https://github.com/apache/kafka/pull/20661#discussion_r2414077634
##########
clients/src/main/java/org/apache/kafka/common/telemetry/internals/ClientTelemetryReporter.java:
##########
@@ -524,17 +525,41 @@ public void handleResponse(PushTelemetryResponse
response) {
lock.writeLock().unlock();
}
}
+
+ private boolean isRetryable(final KafkaException maybeFatalException) {
+ if (maybeFatalException == null) {
+ return true;
+ }
+
+ Throwable cause;
+ if (maybeFatalException.getClass() == KafkaException.class) {
+ if (maybeFatalException.getCause() == null) {
+ return false;
+ } else {
+ cause = maybeFatalException.getCause();
+ }
+ } else {
+ cause = maybeFatalException;
+ }
+ while (cause != null) {
+ if (!(cause instanceof RetriableException)) {
+ return false;
+ }
Review Comment:
Any fatal exception found in the chain will turn telemetry off
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]