johnjcasey commented on code in PR #22375:
URL: https://github.com/apache/beam/pull/22375#discussion_r934558030
##########
sdks/java/io/pulsar/src/main/java/org/apache/beam/sdk/io/pulsar/ReadFromPulsarDoFn.java:
##########
@@ -155,11 +155,11 @@ public ProcessContinuation processElement(
reader.seek(startTimestamp);
}
while (true) {
- if (reader.hasReachedEndOfTopic()) {
+ if (!reader.hasMessageAvailable()) {
reader.close();
return ProcessContinuation.stop();
}
- Message<byte[]> message = reader.readNext();
+ Message<byte[]> message = reader.readNext(5, TimeUnit.SECONDS);
Review Comment:
why did you choose 5 seconds here?
--
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]