From 82b2f8eefac157843c6ccec80d94f202c06bd195 Mon Sep 17 00:00:00 2001 From: rongtong Date: Wed, 18 Oct 2023 13:51:47 +0800 Subject: [PATCH] AddBroker removes parsing configuration from body (#7472) --- .../rocketmq/container/BrokerContainerProcessor.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java b/container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java index 2ac69112d76..5b825fe811c 100644 --- a/container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java +++ b/container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java @@ -91,11 +91,10 @@ private synchronized RemotingCommand addBroker(ChannelHandlerContext ctx, LOGGER.error("addBroker load config from {} failed, {}", configPath, e); } } else { - byte[] body = request.getBody(); - if (body != null) { - String bodyStr = new String(body, MixAll.DEFAULT_CHARSET); - brokerProperties = MixAll.string2Properties(bodyStr); - } + LOGGER.error("addBroker config path is empty"); + response.setCode(ResponseCode.SYSTEM_ERROR); + response.setRemark("addBroker config path is empty"); + return response; } if (brokerProperties == null) {