Skip to content

Commit c05dcdc

Browse files
authored
[ISSUE #9611] Should exec callback in the Pop based on rocksdb impl (#9612)
1 parent 9e2445e commit c05dcdc

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,15 @@ public RemotingCommand processRequest(final ChannelHandlerContext ctx, RemotingC
387387
requestHeader.getAttemptId(), requestHeader.getInitMode(), messageFilter);
388388

389389
popAsyncFuture.thenApply(result -> {
390+
try {
391+
if (request.getCallbackList() != null) {
392+
request.getCallbackList().forEach(CommandCallback::accept);
393+
request.getCallbackList().clear();
394+
}
395+
} catch (Throwable t) {
396+
POP_LOGGER.error("PopProcessor execute callback error", t);
397+
}
398+
390399
if (result.isFound()) {
391400
response.setCode(ResponseCode.SUCCESS);
392401
getMessageResult.setStatus(GetMessageStatus.FOUND);

0 commit comments

Comments
 (0)