public void parse(String file, String separator) throws IOException {
        System.out.println(file);
        bufferedReader = new BufferedReader(new FileReader(file));
        String[] fields = bufferedReader.readLine().split(separator);
        String line = bufferedReader.readLine();
        String[] values = null;
        List<Record> records = new ArrayList<Record>();
        int counter = 0;
        while (line != null) {
            values = line.split(separator);
            Map<String, String> fieldsMap = new HashMap<String, String>();
            for (int i = 0; i < fields.length; i++) {
                if (values.length > i) {
                    fieldsMap.put(fields[i].toLowerCase(), values[i]);
                } else {
                    fieldsMap.put(fields[i].toLowerCase(), "");
                }
            }
            records.add(new Record(broker, client, fieldsMap, "123"));
            if (counter == 1000) {
                recordRepository.save(records);
                records.clear();
                System.out.println(counter);
                counter = 0;
            }
            line = bufferedReader.readLine();
            counter++;
        }
        if (records.size() != 0) {
            recordRepository.save(records);
        }
        bufferedReader.close();
    }