You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/11/23 15:59:45 UTC

[GitHub] [pulsar] merlimat commented on a change in pull request #12946: Use sendAsync instead of send when produce message to retry topic.

merlimat commented on a change in pull request #12946:
URL: https://github.com/apache/pulsar/pull/12946#discussion_r755274729



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
##########
@@ -624,8 +624,8 @@ public UnAckedMessageTracker getUnAckedMessageTracker() {
                     if (message.hasKey()) {
                         typedMessageBuilderNew.key(message.getKey());
                     }
-                    typedMessageBuilderNew.send();
-                    return doAcknowledge(messageId, ackType, properties, null);
+                    return typedMessageBuilderNew.sendAsync().thenAccept(__ ->

Review comment:
       We should add `exceptionally()` section to handle the `CompletableFuture` failure and do negative-ack again on the message.




-- 
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: commits-unsubscribe@pulsar.apache.org

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