发送消息到mq

This commit is contained in:
qiminbao
2025-08-25 18:03:16 +08:00
parent 94856a31e8
commit d4846a8848
2 changed files with 3 additions and 3 deletions
@@ -37,7 +37,7 @@ public class AgentEncoderHandler extends ChannelOutboundHandlerAdapter {
return;
}
AssertLog.info(">>[down]:IP:{},[content]==>{}", sessionManager.client(ctx), entity.getData());
String json = "agent-server:"+JSON.toJSONString(entity)+"@tong-ran";
String json = JSON.toJSONString(entity);
byte[] bytes = json.getBytes(StandardCharsets.UTF_8); // 显式指定 UTF-8
// byte[] bytes = EscapeUtil.hexStringToByteArray(entity.getContent());
ByteBuf buf = Unpooled.wrappedBuffer(bytes);