Created
December 15, 2020 10:27
-
-
Save mchmielarz/f3fff04622babffdb78a83000a857618 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
| Consumer | |
| .plainPartitionedSource(consumerSettings, Subscriptions.topics(topicName)) | |
| .mapAsync(maxPartitions, pair -> { | |
| Source<ConsumerRecord<String, String>, NotUsed> source = pair.second(); | |
| return source | |
| .map(record -> { | |
| // processing logic comes here | |
| return record; | |
| }) | |
| .runWith(Sink.ignore(), materializer); | |
| }) | |
| .runWith(Sink.ignore(), materializer) | |
| .toCompletableFuture() | |
| .handle(AppSupport.doneHandler()) | |
| .join(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment