hussein-awala commented on code in PR #33321:
URL: https://github.com/apache/airflow/pull/33321#discussion_r1291853534


##########
airflow/providers/apache/kafka/operators/consume.py:
##########
@@ -161,7 +161,8 @@ def execute(self, context) -> Any:
                 batch_size = self.max_batch_size
 
             msgs = consumer.consume(num_messages=batch_size, 
timeout=self.poll_timeout)
-            messages_left -= len(msgs)
+            if not self.read_to_end:
+                messages_left -= len(msgs)

Review Comment:
   Discussed and proposed in 
[slack](https://apache-airflow.slack.com/archives/CCZRF2U5A/p1690806712486489?thread_ts=1690712126.666369&cid=CCZRF2U5A)



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