Skip to content
Sharp

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)

  1. 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
  2. Why does the map() function when used with a Mono matter in this design?Multiple choiceMedium
  3. Which of the following best describes the role of a Subscriber in the Reactive Streams specification?Multiple choiceEasy
  4. How does the map() function differ from flatMap() in a Mono context?Multiple choiceMedium
  5. How can you handle errors in a Mono pipeline using Project Reactor?Multiple choiceMedium
  6. Which method in Project Reactor would you use to subscribe to a Mono and provide a fallback value if it completes empty?Multiple choiceHard
  7. 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
  8. In a reactive pipeline, how does flatMap() help with parallelism?Multiple choiceHard
  9. Which method is used to handle backpressure in a Flux?Multiple choiceMedium
  10. Why is it important to avoid blocking the event loop in a reactive application?Multiple choiceHard
  11. How would you transform a blocking database call to a non-blocking one using Mono?Multiple choiceMedium
  12. How would you explain a key difference between map() and flatMap() in Project Reactor in an interview?Multiple choiceMedium