Created
July 27, 2020 00:11
-
-
Save bijukunjummen/88fe13c915f86dc8ae1ffb894ec5efb3 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
producer.produce(producerRate, count) | |
.subscribeOn(subscribeOnScheduler) | |
.publishOn(publishOnScheduler, 10) | |
.flatMap({ value: Long -> | |
Mono.fromSupplier { | |
sleep(delayBetweenConsumes) | |
logger.info("Consumed {}", value) | |
null | |
}.subscribeOn(flatMapScheduler) | |
}, concurrency) | |
.subscribe() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment