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


##########
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:
   I agree with the concerns here, I've seen very troublesome async writers in 
Beam that were prone to loosing data. I suppose in this case it depends on the 
behavior of `producer.flush()` in `finishBundle()`. Does it block until all 
pending messages are send? If so, I'd suggest to add some comments to clarify.



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