class BatchSyncUtil {

    public void syncCourseBatch(String courseId, MessageCollector collector) {
        //Get Coursebatch from course_batch table using courseId
        List<Row> courseBatchRows = readbatch("course_batch", courseId);

        //For each batch exists. fetch enrollment from user_courses table and push the message to kafka
        for(Row row: courseBatchRows) {
            if(1 == row.getInt("status")) {
                List<Row> userCoursesRows = read("user_courses", Arrays.asList(row.getString("batchid")));
                pushEventsToKafka(userCoursesRows, collector);
                LOGGER.info("Pushed the events to sync courseBatch enrollment for : " + courseId);
            }
        }
    }

}