/ProducerReviews.java Secret
Last active
October 22, 2017 09:29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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