Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,24 @@ public CompletableFuture<SendReceipt> asyncSend(String destination, Message<?> m
throw new IllegalArgumentException("`message` and `message.payload` cannot be null");
}
Producer grpcProducer = this.getProducer();
CompletableFuture<SendReceipt> future0;
try {
org.apache.rocketmq.client.apis.message.Message rocketMsg = this.createRocketMQMessage(destination, message, messageDelayTime, messageGroup);
future = grpcProducer.sendAsync(rocketMsg);
future0 = grpcProducer.sendAsync(rocketMsg);
if (null != future) {
future0.whenComplete((sendReceipt, throwable) -> {
if (null != throwable) {
future.completeExceptionally(throwable);
} else {
future.complete(sendReceipt);
}
});
}
} catch (Exception e) {
log.error("send request message failed. destination:{}, message:{} ", destination, message);
throw new MessagingException(e.getMessage(), e);
}
return future;
return future0;
}

public Pair<SendReceipt, Transaction> sendMessageInTransaction(String destination, Object payload) throws ClientException {
Expand Down
Loading