diff --git a/qmq-remoting/src/main/java/qunar/tc/qmq/metainfoclient/MetaInfoService.java b/qmq-remoting/src/main/java/qunar/tc/qmq/metainfoclient/MetaInfoService.java index 913095f4..7fb52ae2 100644 --- a/qmq-remoting/src/main/java/qunar/tc/qmq/metainfoclient/MetaInfoService.java +++ b/qmq-remoting/src/main/java/qunar/tc/qmq/metainfoclient/MetaInfoService.java @@ -124,15 +124,15 @@ private void request(MetaInfoRequestParam param) { request.setClientId(this.clientId); request.setConsumerGroup(param.group); request.setAppCode(param.getAppCode()); - request.setRequestType(param.getRequestType()); if (param.getRequestType() == null) { if (!hadOnline(param)) { request.setRequestType(ClientRequestType.ONLINE); - } - else { + } else { request.setRequestType(ClientRequestType.HEARTBEAT); } + } else { + request.setRequestType(param.getRequestType()); } LOGGER.debug("meta info request: {}", request);