lizhanhui commented on code in PR #5260: URL: https://github.com/apache/rocketmq/pull/5260#discussion_r991776769
########## broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java: ########## @@ -245,6 +249,16 @@ public RemotingCommand sendMessage(final ChannelHandlerContext ctx, } MessageAccessor.setProperties(msgInner, oriProps); + + DeletePolicy deletePolicy = DeletePolicyUtils.getDeletePolicy(Optional.of(topicConfig)); + if (Objects.equals(deletePolicy, DeletePolicy.COMPACTION)) { + if (StringUtils.isBlank(msgInner.getKeys())) { + response.setCode(ResponseCode.MESSAGE_ILLEGAL); + response.setRemark("the message don't have message key"); Review Comment: ```suggestion response.setRemark("Required message key is missing"); ``` -- 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: dev-unsubscr...@rocketmq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org