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 1 of 2)

  1. What does the Mono.just(T data) method do?Multiple choiceEasy
  2. In the context of Reactive Streams, what role does a Subscriber play?Multiple choiceEasy
  3. If a Mono completes empty, which of the following methods can be used to provide a default value?Multiple choiceHard
  4. When transitioning from Spring MVC to WebFlux, what is a key advantage concerning server performance?Multiple choiceMedium
  5. When using Mono<User> in a reactive system, how should you handle a database call to ensure it remains non-blocking?Multiple choiceMedium
  6. What does the Publisher interface in the Reactive Streams specification do?Multiple choiceEasy
  7. Which of the following statements about the Event Loop in a non-blocking reactive system is true?Multiple choiceHard
  8. What does a Mono in Project Reactor mainly do?Multiple choiceEasy
  9. In Project Reactor, which operator would you use to transform each element of a Flux by applying a function to it?Multiple choiceEasy
  10. In a Project Reactor pipeline, why would you use flatMap() instead of map() to handle a stream of product IDs that need to be fetched from a remote service?Multiple choiceMedium
  11. How does backpressure relate to a Mono in Project Reactor?Multiple choiceHard
  12. Which of the following is a common use case for using Flux in an e-commerce application?Multiple choiceEasy
  13. What potential issue could arise from improperly handling backpressure in a live price data Flux?Multiple choiceHard
  14. What role does the Publisher interface play in the Reactive Streams Specification?Multiple choiceMedium
  15. Which Project Reactor class would you use to handle a single asynchronous result?Multiple choiceEasy
  16. In Reactive Streams, how can backpressure be applied effectively to prevent overwhelming a Subscriber?Multiple choiceMedium
  17. Why is it important to avoid blocking the event loop in a non-blocking reactive system?Multiple choiceHard
  18. In Project Reactor, what is the main purpose of the flatMap() operator in a Flux?Multiple choiceMedium
  19. Given a Flux of Order objects in a non-blocking system, which transformation would you use to fetch and process order details asynchronously?Multiple choiceHard
  20. When applying backpressure in a reactive stream, which strategy can be used to control the rate at which a Subscriber processes data?Multiple choiceHard
  21. What does backpressure in a Flux help mitigate in a reactive system?Multiple choiceMedium
  22. What happens if you block the event loop in a reactive application?Multiple choiceHard
  23. In a reactive system, what is a potential danger of using a blocking call inside a flatMap() operation?Multiple choiceMedium
  24. When using Project Reactor's Flux to handle a live websocket feed, what is a key consideration?Multiple choiceMedium
  25. In Project Reactor, which operator would you use to transform each element of a Flux into another Flux and then flatten the results into a single Flux?Multiple choiceMedium
  26. How would you explain a key characteristic of a Flux in Project Reactor in an interview?Multiple choiceEasy
  27. In a reactive system, why is blocking the event loop considered a severe issue?Multiple choiceHard
  28. How can a Flux be created to simulate an infinite stream of data for testing purposes?Multiple choiceMedium
  29. Why does the difference between map() and flatMap() in the context of a Mono matter in practice?Multiple choiceMedium
  30. How does using Flux help in processing large datasets without crashing due to OutOfMemory errors?Multiple choiceMedium
  31. What does the subscribe() method do in a Flux?Multiple choiceEasy
  32. Which of the following best describes backpressure in the context of Reactive Streams?Multiple choiceMedium
  33. Which method should you use to convert a blocking call into a non-blocking Mono in a reactive application?Multiple choiceHard
  34. How would you explain the key difference between Mono and Flux in Project Reactor in an interview?Multiple choiceMedium
  35. In the context of Flux, what does the term 'infinite stream' imply?Multiple choiceEasy
  36. How does Project Reactor's Flux help avoid OutOfMemory errors when processing large datasets?Multiple choiceMedium
  37. How would you explain a key feature of backpressure in reactive streams in an interview?Multiple choiceMedium
  38. In Project Reactor, what does the flatMap() method do?Multiple choiceEasy
  39. When using WebFlux with Virtual Threads, what is the main advantage over traditional thread-per-request models?Multiple choiceHard
  40. In the context of Project Reactor, which operation would you use to ensure that each item in a Flux is processed sequentially before the next item is processed?Multiple choiceMedium
  41. Why is flatMap() often preferred in reactive programming for handling I/O operations?Multiple choiceEasy
  42. In a reactive system, why might using map() instead of flatMap() lead to a bottleneck?Multiple choiceMedium
  43. Why does the difference between Mono and Flux in Project Reactor matter in practice?Multiple choiceMedium
  44. Why is flatMap() preferred over map() for handling network calls in a reactive system?Multiple choiceMedium
  45. What does the Project Reactor Mono type represent in a reactive stream?Multiple choiceEasy
  46. In a reactive system, why should blocking the event loop be avoided?Multiple choiceMedium
  47. Why does blocking the Event Loop in a WebFlux application change runtime behavior?Multiple choiceHard
  48. Why does the subscribe() method in a Mono matter in practice?Multiple choiceEasy
  49. What type of object does the flatMap() method return in Project Reactor?Multiple choiceEasy
  50. In Project Reactor, what is a primary benefit of using flatMap() over map() when dealing with asynchronous data streams?Multiple choiceEasy