lianetm commented on code in PR #17989:
URL: https://github.com/apache/kafka/pull/17989#discussion_r1866317609


##########
clients/src/main/java/org/apache/kafka/common/requests/ConsumerGroupHeartbeatRequest.java:
##########
@@ -59,6 +60,9 @@ public Builder(ConsumerGroupHeartbeatRequestData data, 
boolean enableUnstableLas
 
         @Override
         public ConsumerGroupHeartbeatRequest build(short version) {
+            if (version == 0 && data.subscribedTopicRegex() != null) {
+                throw new UnsupportedVersionException("Broker does not support 
resolution of SubscriptionPattern on version " + version);

Review Comment:
   you're right, we have the same exception but in 2 diff cases, so I made the 
changes to separate the messages, one for the case of HB API not supported 
(protocol is not enabled), the other one for when a required HB version is not 
supported (ex. v1 for regex). Also changed the msgs a bit to make them 
consistent, thoughts?



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