From 01827c8dd3a4e375cdea4e802f93c802ec43ea83 Mon Sep 17 00:00:00 2001 From: qqeasonchen Date: Mon, 21 Oct 2019 11:37:30 +0800 Subject: [PATCH] remove unused code and fix typo --- .../broker/processor/ReplyMessageProcessorTest.java | 3 +-- .../rocketmq/client/impl/ClientRemotingProcessor.java | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/broker/src/test/java/org/apache/rocketmq/broker/processor/ReplyMessageProcessorTest.java b/broker/src/test/java/org/apache/rocketmq/broker/processor/ReplyMessageProcessorTest.java index 94fd8f56..85c77504 100644 --- a/broker/src/test/java/org/apache/rocketmq/broker/processor/ReplyMessageProcessorTest.java +++ b/broker/src/test/java/org/apache/rocketmq/broker/processor/ReplyMessageProcessorTest.java @@ -71,8 +71,7 @@ public class ReplyMessageProcessorTest { private MessageStore messageStore; @Mock private Channel channel; - @Mock - private TransactionalMessageService transactionMsgService; + private String topic = "FooBar"; private String group = "FooBarGroup"; private ClientChannelInfo clientInfo; diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/ClientRemotingProcessor.java b/client/src/main/java/org/apache/rocketmq/client/impl/ClientRemotingProcessor.java index 5cac5e83..c57e49bb 100644 --- a/client/src/main/java/org/apache/rocketmq/client/impl/ClientRemotingProcessor.java +++ b/client/src/main/java/org/apache/rocketmq/client/impl/ClientRemotingProcessor.java @@ -83,7 +83,7 @@ public class ClientRemotingProcessor implements NettyRequestProcessor { return this.consumeMessageDirectly(ctx, request); case RequestCode.PUSH_REPLY_MESSAGE_TO_CLIENT: - return this.receiveReplyMssage(ctx, request); + return this.receiveReplyMessage(ctx, request); default: break; } @@ -222,7 +222,7 @@ public class ClientRemotingProcessor implements NettyRequestProcessor { return response; } - private RemotingCommand receiveReplyMssage(ChannelHandlerContext ctx, + private RemotingCommand receiveReplyMessage(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { final RemotingCommand response = RemotingCommand.createResponseCommand(null); @@ -293,7 +293,9 @@ public class ClientRemotingProcessor implements NettyRequestProcessor { requestResponseFuture.putResponseMessage(replyMsg); } } else { - log.warn(String.format("receive reply message, but not matched any request, CorrelationId: %s", correlationId)); + String bornHost = replyMsg.getBornHostString(); + log.warn(String.format("receive reply message, but not matched any request, CorrelationId: %s , reply from host: %s", + correlationId, bornHost)); } } } -- GitLab