private ByteBuf buildTxtMsgRspPackage(MsgType msgType, String attrs, AbsV0MsgCodec msgObj) {
        int attrsLen = 0;
        int bodyLen = 0;
        byte[] backBody;
        byte[] byTeAttrs = null;
        if (attrs != null) {
            byTeAttrs = attrs.getBytes(StandardCharsets.UTF_8);
            attrsLen = byTeAttrs.length;
        }
        if (MsgType.MSG_ORIGINAL_RETURN.equals(msgType)) {
            backBody = msgObj.getOrigBody();
            if (backBody != null) {
                bodyLen = backBody.length;
            }
        } else {
            backBody = new byte[]{50};
            bodyLen = backBody.length;
        }
        // backTotalLen = mstType + bodyLen + body + attrsLen + attrs
        int backTotalLen = 1 + 4 + bodyLen + 4 + attrsLen;
        ByteBuf buffer = ByteBufAllocator.DEFAULT.buffer(4 + backTotalLen);
        buffer.writeInt(backTotalLen);
        buffer.writeByte(msgType.getValue());
        buffer.writeInt(bodyLen);
        if (bodyLen > 0) {
            buffer.writeBytes(backBody);
        }
        buffer.writeInt(attrsLen);
        if (attrsLen > 0) {
            buffer.writeBytes(byTeAttrs);
        }
        return buffer;
    }
Build default-msg response message ByteBuf

@param msgType  the message type
@param attrs    the return attribute
@param msgObj   the request message object
@return ByteBuf
inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/ServerMessageHandler.java