Project Reactor interview questions
Functional Pipelines (flatMap), Project Reactor: Flux, Project Reactor: Mono
62 questions with answers and explanations · 61 flashcards
Questions (page 2 of 2)
- Given the following code snippet, what is the expected output order? Flux.just(1, 2, 3).flatMap(i -> Mono.just(i * 2)).subscribe(System.out::println);?Multiple choiceMedium
- Why does the map() function when used with a Mono matter in this design?Multiple choiceMedium
- Which of the following best describes the role of a Subscriber in the Reactive Streams specification?Multiple choiceEasy
- How does the map() function differ from flatMap() in a Mono context?Multiple choiceMedium
- How can you handle errors in a Mono pipeline using Project Reactor?Multiple choiceMedium
- Which method in Project Reactor would you use to subscribe to a Mono and provide a fallback value if it completes empty?Multiple choiceHard
- How would you explain the key advantage of using WebFlux over traditional Spring MVC concerning the server's resource management in an interview?Multiple choiceHard
- In a reactive pipeline, how does flatMap() help with parallelism?Multiple choiceHard
- Which method is used to handle backpressure in a Flux?Multiple choiceMedium
- Why is it important to avoid blocking the event loop in a reactive application?Multiple choiceHard
- How would you transform a blocking database call to a non-blocking one using Mono?Multiple choiceMedium
- How would you explain a key difference between map() and flatMap() in Project Reactor in an interview?Multiple choiceMedium