Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Reactive Programming with Reactor

You're reading from   Hands-On Reactive Programming with Reactor Build reactive and scalable microservices using the Reactor framework

Arrow left icon
Product type Paperback
Published in Sep 2018
Publisher Packt
ISBN-13 9781789135794
Length 250 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (13) Chapters Close

Preface 1. Getting Started with Reactive Streams FREE CHAPTER 2. The Publisher and Subscriber APIs in a Reactor 3. Data and Stream Processing 4. Processors 5. SpringWebFlux for Microservices 6. Dynamic Rendering 7. Flow Control and Backpressure 8. Handling Errors 9. Execution Control 10. Testing and Debugging 11. Assessments 12. Other Books You May Enjoy

Backpressure

Backpressure is an integral part of Reactor. We have discussed it multiple times in previous chapters, but we will have a detailed look at the topic here. Let's recap the out-of-the-box support for backpressure that is available with Reactor. Each of the subscribers requests the number of events that it can process using the subscription object. The publisher must respect this limit and publish events that are less than or equal to the requested limit. This is depicted in the following diagram:

Invoking a request with Long.MAX_VALUE means requesting an unbounded number of events. The publisher can push as many events as it can. It is no longer bound by the subscriber limit.

As each subscriber is processing the received events, it can request additional events using the subscription handle. If the publisher is raising events rapidly, it must come up with a strategy...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image