public static ByteBuf buildBinMsgRspPackage(String attrs, long uniqVal) {
        // calculate total length
        int attrsLen = 0;
        byte[] byTeAttrs = null;
        if (null != attrs) {
            byTeAttrs = attrs.getBytes(StandardCharsets.UTF_8);
            attrsLen = byTeAttrs.length;
        }
        // binTotalLen = mstType + uniq + attrsLen + attrs + magic
        int binTotalLen = 1 + 4 + 2 + attrsLen + 2;
        // allocate buffer and write fields
        ByteBuf binBuffer = ByteBufAllocator.DEFAULT.buffer(4 + binTotalLen);
        binBuffer.writeInt(binTotalLen);
        binBuffer.writeByte(MsgType.MSG_BIN_MULTI_BODY.getValue());
        byte[] uniq = new byte[4];
        uniq[0] = (byte) ((uniqVal >> 24) & 0xFF);
        uniq[1] = (byte) ((uniqVal >> 16) & 0xFF);
        uniq[2] = (byte) ((uniqVal >> 8) & 0xFF);
        uniq[3] = (byte) (uniqVal & 0xFF);
        binBuffer.writeBytes(uniq);
        binBuffer.writeShort(attrsLen);
        if (attrsLen > 0) {
            binBuffer.writeBytes(byTeAttrs);
        }
        binBuffer.writeShort(0xee01);
        return binBuffer;
    }
Build bin-msg response message ByteBuf

@param attrs   the return attribute
@param uniqVal sequence Id
@return ByteBuf
inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/ServerMessageHandler.java