Skip to content

Instantly share code, notes, and snippets.

@simplesteph
Last active October 22, 2017 09:29
while (udemyRESTClientRunning()){
Review review = reviewsQueue.poll();
if (review == null) {
Thread.sleep(200);
} else {
reviewCount += 1;
log.info("Sending review " + reviewCount + ": " + review);
kafkaProducer.send(new ProducerRecord<>("udemy-reviews", review));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment