dimitarndimitrov commented on code in PR #13432:
URL: https://github.com/apache/kafka/pull/13432#discussion_r1170897060


##########
clients/src/main/java/org/apache/kafka/clients/admin/internals/AdminApiHandler.java:
##########
@@ -70,6 +71,23 @@
      */
     ApiResult<K, V> handleResponse(Node broker, Set<K> keys, AbstractResponse 
response);
 
+    /**
+     * Callback that is invoked when a fulfillment request hits an 
UnsupportedVersionException.
+     * Keys for which the exception cannot be handled and the request 
shouldn't be retried must be mapped
+     * to an error and returned. The request will then be retried for the 
remainder of the keys.
+     *
+     * @return The failure mappings for the keys for which the exception 
cannot be handled and the
+     * request shouldn't be retried. If the exception cannot be handled all 
initial keys will be in
+     * the returned map.
+     */
+    default Map<K, Throwable> handleUnsupportedVersionException(
+        int brokerId,

Review Comment:
   That's what I first looked into but I didn't find a nice way to achieve it 
unless I also add a `Node` param in `onFailure` and pass down the current node 
from the `Call` instance in `KafkaAdminClient.newCall`. That however would 
require a number of changes related to the new `onFailure` signature so I am 
not too fond of the idea.
   Let me know if you have anything better in mind.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to