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


##########
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:
   Agree, this allows us to show an error msg specific to the field and version 
required (and it's also detecting it while building the request, so avoiding 
the actual HB request doomed to fail). 
   
   I updated the msg to add the version required as suggested.



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