Created
May 21, 2018 09:15
-
-
Save joan38/7a6cc741f66e95369bb0bcb74efe3ebe to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| val config = new Properties() | |
| config.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "kafka:9092") | |
| val postProducer = Producer[Post](config) | |
| val post = Post(Id[Post]("post0"), Instant.now(), Id[User]("user0"), "Some text", URI.create("https://some-uri"), false) | |
| postProducer.send(post) | |
| postProducer.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment