drpmma commented on code in PR #8368:
URL: https://github.com/apache/rocketmq/pull/8368#discussion_r1673551734


##########
client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:
##########
@@ -400,6 +400,33 @@ public CompletableFuture<Void> updateConsumerOffsetOneWay(
         return future;
     }
 
+    public CompletableFuture<Void> updateConsumerOffsetAsync(
+        String brokerAddr,
+        UpdateConsumerOffsetRequestHeader header,
+        long timeoutMillis
+    ) {
+        RemotingCommand request = 
RemotingCommand.createRequestCommand(RequestCode.UPDATE_CONSUMER_OFFSET, 
header);
+        CompletableFuture<Void> future = new CompletableFuture<>();
+        invoke(brokerAddr, request, timeoutMillis).whenComplete((response, t) 
-> {

Review Comment:
   It's recommended to use thenApply method.



-- 
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-unsubscr...@rocketmq.apache.org

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

Reply via email to