未验证 提交 fc3fb2fd 编写于 作者: R rongtong 提交者: GitHub

[ISSUE #1787] Fix the issue that queryCq command of mqadmin returned incorrect data (#1793)

* fix(tools):fix the issue that queryCq command of mqadmin returned incorrect data

* fix(mqadmin):set status code in advance in queryConsumeQueue method
上级 d15234c6
......@@ -1493,11 +1493,9 @@ public class AdminBrokerProcessor implements NettyRequestProcessor {
response.setRemark(String.format("%d@%s is not exist!", requestHeader.getQueueId(), requestHeader.getTopic()));
return response;
}
QueryConsumeQueueResponseBody body = new QueryConsumeQueueResponseBody();
response.setCode(ResponseCode.SUCCESS);
response.setBody(body.encode());
QueryConsumeQueueResponseBody body = new QueryConsumeQueueResponseBody();
body.setMaxQueueIndex(consumeQueue.getMaxOffsetInQueue());
body.setMinQueueIndex(consumeQueue.getMinOffsetInQueue());
......@@ -1556,7 +1554,7 @@ public class AdminBrokerProcessor implements NettyRequestProcessor {
} finally {
result.release();
}
response.setBody(body.encode());
return response;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册