You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/11/03 13:10:46 UTC
[GitHub] [flink] syhily commented on a change in pull request #17643: [FLINK-24733][connector/pulsar] Data loss in pulsar source when using shared mode
syhily commented on a change in pull request #17643:
URL: https://github.com/apache/flink/pull/17643#discussion_r741920168
##########
File path: flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/reader/split/PulsarUnorderedPartitionSplitReader.java
##########
@@ -80,8 +80,16 @@ public PulsarUnorderedPartitionSplitReader(
@Override
protected Message<byte[]> pollMessage(Duration timeout)
throws ExecutionException, InterruptedException, TimeoutException {
- Message<byte[]> message =
- pulsarConsumer.receiveAsync().get(timeout.toMillis(), TimeUnit.MILLISECONDS);
+ CompletableFuture<Message<byte[]>> messageCompletableFuture = pulsarConsumer.receiveAsync();
Review comment:
I think we can use `Message<T> receive(int timeout, TimeUnit unit)`, this would be better for this fix.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org