AndrewJSchofield commented on code in PR #18101:
URL: https://github.com/apache/kafka/pull/18101#discussion_r1898455328


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractHeartbeatRequestManager.java:
##########
@@ -461,15 +434,24 @@ protected void handleFatalFailure(Throwable error) {
         membershipManager().transitionToFatal();
     }
 
+    /**
+     * Error handling specific failure to a group type when sending the 
request.

Review Comment:
   I would add "and no response has been received" to the comment. This is the 
crucial difference between the usage of `handleSpecificFailure` and 
`handleSpecificExceptionInResponse`.



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerHeartbeatRequestManager.java:
##########
@@ -91,12 +94,43 @@ public ConsumerHeartbeatRequestManager(
      * {@inheritDoc}
      */
     @Override
-    public boolean handleSpecificError(final ConsumerGroupHeartbeatResponse 
response, final long currentTimeMs) {
+    public boolean handleSpecificFailure(Throwable exception) {
+        boolean errorHandled = false;
+        String errorMessage = exception.getMessage();
+        if (exception instanceof UnsupportedVersionException) {
+            String message = CONSUMER_PROTOCOL_NOT_SUPPORTED_MSG;
+            if (errorMessage.equals(REGEX_RESOLUTION_NOT_SUPPORTED_MSG)) {
+                message = REGEX_RESOLUTION_NOT_SUPPORTED_MSG;
+                logger.error("{} failed due to regex resolution not support: 
{}", heartbeatRequestName(), message);

Review Comment:
   nit: "regex resolution not supported".



-- 
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]

Reply via email to