jlampek commented on code in PR #30485:
URL: https://github.com/apache/beam/pull/30485#discussion_r1513306173
##########
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:
Pardon my mistyping. I wrote "until it first gets a message" and meant to
write "after it first gets a message". At that stage currentMessage is non-null
and the code will receiveNoWait().
Meanwhile, receive with a recieveTimeOutMillis will always consume a message
even if it arrives before the timeout.
In a scenario where published messages are arriving less frequently, it
would have a moment of quickly reaching out.
It does not appear to have a significant impact on calls but it makes it
easier to triage what is happening where all calls have millisecond timeout
above a threshold.
--
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]