xdkxlk commented on code in PR #6568: URL: https://github.com/apache/rocketmq/pull/6568#discussion_r1305272660
########## proxy/src/main/java/org/apache/rocketmq/proxy/processor/ProducerProcessor.java: ########## @@ -102,11 +108,18 @@ public CompletableFuture<List<SendResult>> sendMessage(ProxyContext ctx, QueueSe if (SendStatus.SEND_OK.equals(sendResult.getSendStatus()) && tranType == MessageSysFlag.TRANSACTION_PREPARED_TYPE && StringUtils.isNotBlank(sendResult.getTransactionId())) { - fillTransactionData(ctx, producerGroup, messageQueue, sendResult, messageList); + fillTransactionData(ctx, producerGroup, finalMessageQueue, sendResult, messageList); } } + endTimestamp.set(System.currentTimeMillis()); + this.serviceManager.getTopicRouteService().updateFaultItem(finalMessageQueue.getBrokerName(),endTimestamp.get() - beginTimestampFirst, false, true); return sendResultList; - }, this.executor); + }, this.executor) + .exceptionally(t -> { Review Comment: Use whenComplete is better. When an exception occurs, the upper layer function will get null in thenApply -- 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