You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/24 19:53:04 UTC

[GitHub] [beam] johnjcasey commented on a diff in pull request #22026: pulsar connector produces message asynchronously

johnjcasey commented on code in PR #22026:
URL: https://github.com/apache/beam/pull/22026#discussion_r906365733


##########
sdks/java/io/pulsar/src/main/java/org/apache/beam/sdk/io/pulsar/WriteToPulsarDoFn.java:
##########
@@ -45,12 +54,48 @@ public void setup() throws PulsarClientException {
 
   @ProcessElement
   public void processElement(@Element byte[] messageToSend) throws Exception {
-    producer.send(messageToSend);
+    producer.sendAsync(messageToSend)

Review Comment:
   Is there any concern of data loss here? Typically Beam is supposed to handle any threading or async itself. I'm thinking of the case where async is delayed, and Beam thinks a given element is completed, but it hasn't actually been sent to pulsar.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org