Abacn commented on code in PR #30485:
URL: https://github.com/apache/beam/pull/30485#discussion_r1513322177


##########
sdks/java/io/jms/src/main/java/org/apache/beam/sdk/io/jms/JmsIO.java:
##########
@@ -586,7 +605,13 @@ public boolean advance() throws IOException {
       try {
         Message message;
         synchronized (this) {
-          message = this.consumer.receiveNoWait();
+          if (currentMessage != null || receiveTimeoutMillis == 0L) {

Review Comment:
   I did this because I was wondering if `receive` will add more overload than 
`receiveNoWait`. In the case of lot of backlogs, it may be beneficial to have 
`receiveNoWait` to keep the latency as low as currently it does (for greedy 
polling)



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