htran1 commented on a change in pull request #2556: GOBBLIN-684: Ensure 
buffered messages are flushed before close() in K…
URL: https://github.com/apache/incubator-gobblin/pull/2556#discussion_r257845882
 
 

 ##########
 File path: 
gobblin-modules/gobblin-kafka-08/src/main/java/org/apache/gobblin/metrics/kafka/KafkaKeyValueProducerPusher.java
 ##########
 @@ -47,6 +51,9 @@
   private final String topic;
   private final KafkaProducer<K, V> producer;
   private final Closer closer;
+  private final Queue<Future<RecordMetadata>> futures = new 
LinkedBlockingDeque<>();
 
 Review comment:
   Can you add a comment that this queue must have capacity (currently 
unlimited) of at least `MAX_NUM_FUTURES_TO_BUFFER` plus concurrency buffer 
since a non-blocking `offer` is used? Just in prevent someone from 
inadvertently adding an incorrect limit.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

Reply via email to