In this section, we will discuss backpressure, one of the most important key concepts of Akka Streams supported features, with some simple and useful diagrams.
The main goal of the Akka Streams API is to support asynchronous streaming data with non-blocking backpressure, so as to support better performance and ease of maintainability for fast data-processing applications. It's therefore very important to understand what backpressure is, how it works, and why we need it in Akka Streams.
In Akka Streams, backpressure is a technique for flow-control between a Producer and a Consumer. It gives a way for the Consumer to inform the Producer about the number of data elements or messages it can accept so that the Producer sends only that number of data elements to the Consumer to avoid failures such as OutOfMemory issues.
Before moving to Akka-style backpressure, we...