cadonna commented on code in PR #14810:
URL: https://github.com/apache/kafka/pull/14810#discussion_r1400292495


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java:
##########
@@ -1044,7 +1044,8 @@ public void unsubscribe() {
     @Override
     @Deprecated
     public ConsumerRecords<K, V> poll(final long timeoutMs) {
-        return poll(Duration.ofMillis(timeoutMs));
+        throw new KafkaException("Consumer.poll(long) is not supported when 
\"group.protocol\" is \"consumer\". " +

Review Comment:
   I would use `UnsupportedOperationException` in this case.



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