Github user PramodSSImmaneni commented on a diff in the pull request:

    
https://github.com/apache/incubator-apex-malhar/pull/132#discussion_r48456731
  
    --- Diff: 
contrib/src/main/java/com/datatorrent/contrib/kafka/AbstractKafkaInputOperator.java
 ---
    @@ -363,12 +369,21 @@ public void emitTuples()
         if (maxTuplesPerWindow > 0) {
           count = Math.min(count, maxTuplesPerWindow - emitCount);
         }
    +    if (count > 0) {
    +      // Transmit at least one message in the window even if the message 
size is greater than max message size
    +      if ((emitCount > 0) && ((maxMsgSizePerWindow - emitMsgSize) < 
consumer.peekMessage().msg.size())) {
    +        return;
    +      }
    +    }
    --- End diff --
    
    There are two exit conditions from the loop, one in which i is incremented 
and one not, more readable to just go with a separate variable instead of 
uniformizing the value of i on exit.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to