In this chapter, you will learn:
What a stream is
What the Reactive Streams initiative is and its specification and Java API
The Reactive Streams API in JDK and how to use it
How to create publishers, subscribers, and processors using the Java API for Reactive Streams in JDK 9
What Is a Stream?
A stream is a sequence of items produced by a producer and consumed by one or more consumers. This producer-consumer model is also known as source/sink model or publisher-subscriber model. I refer to it as a publisher-subscriber model in this chapter. I use the terms element, item, data item, and data interchangeably ...