-
-
Save KadekM/65bd68e94bae21403a383c0426046325 to your computer and use it in GitHub Desktop.
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
// ... previous code | |
val consumerM = Consumer.make(consumerSettings) | |
for { | |
_ <- session.execute(Sql.partitionTableDdl) | |
_ <- session.execute(Sql.balanceTableDdl) | |
_ <- consumerM.use { consumer => | |
consumer.subscribeAnd(Subscription.topics(TopicName)) | |
.plainStream(Serde.int, CommandSerde) | |
.tap(x => log.info(x.value.toString)) | |
.runDrain | |
} | |
} yield () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment