发送消息到mq
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user