Reactive Streams · interview question
What happens if a Publisher emits more data than a Subscriber has requested in a Reactive Streams implementation?
Multiple choiceHardchapter-19-curatedpremiumreactive-streamspublisher-and-subscriber
Answer and explanation
Correct answer
D. The excess data is buffered until the Subscriber requests more.
Why
In Reactive Streams, if a Publisher emits more data than requested, the excess data is typically buffered. This allows the Subscriber to process data at its own pace, ensuring that flow control (backpressure) is maintained.
Test yourself on Reactive Streams
A free test with instant, explained results. No account needed.
More Reactive Streams questions
- Why is it essential to avoid legacy JDBC in a reactive WebFlux application?
- What would be the effect of calling request(Long.MAX_VALUE) on a Subscription?
- Why does a Subscriber in the Reactive Streams specification matter in this design?
- How would you explain a key difference between WebFlux and virtual threads for handling concurrency in an interview?
- Which method in a Subscriber handles the completion signal from a Publisher?
- How do Virtual Threads in Project Loom aim to simplify concurrent programming compared to WebFlux?