ijuma commented on a change in pull request #10096:
URL: https://github.com/apache/kafka/pull/10096#discussion_r573812058



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java
##########
@@ -71,6 +71,21 @@
     /** <code>max.poll.interval.ms</code> */
     public static final String MAX_POLL_INTERVAL_MS_CONFIG = 
CommonClientConfigs.MAX_POLL_INTERVAL_MS_CONFIG;
     private static final String MAX_POLL_INTERVAL_MS_DOC = 
CommonClientConfigs.MAX_POLL_INTERVAL_MS_DOC;
+
+    /** <code>long.poll.mode</code> */
+    public static final String LONG_POLL_RETURN_ON_RECORDS = 
"return_on_records";
+    public static final String LONG_POLL_RETURN_ON_RESPONSE = 
"return_on_response";
+    public static final String LONG_POLL_MODE_CONFIG = "long.poll.mode";
+    public static final String LONG_POLL_MODE_DOC = "Whether a call to 
Consumer#poll(...) should block until" +
+        " records are received (return_on_records), or should return early if 
a metadata-only response is received" +
+        " from the brokers (return_on_metadata). The 'return_on_records' mode 
is the default, and it matches prior" +
+        " behavior. The 'return_on_response' mode allows callers to witness 
topic metadata changes via" +
+        " ConsumerRecords#metadata() as soon as they are received in a fetch 
response, even if there are no records" +
+        " included in the response. Callers who are only interested in seeing 
records should leave the default in" +
+        " place, and callers who are interested in maintaining fresh local 
information about the current lag should" +
+        " enable 'return_on_response'." +
+        " Note that the Consumer metrics are always updated upon receipt of 
the fetch responses.";

Review comment:
       In what KIP was this approved?




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

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


Reply via email to