Examining producers and consumers
The producer-consumer pattern might be more familiar under a different moniker—Publish-Subscribe or pub-sub. While the terminology may differ, the intent behind the messaging pattern is the same. There are components that produce (or publish) events, and there are components that consume (or subscribe to) events. As mentioned in Chapter 1, The Sample Application, different mechanisms can support event-based messaging patterns. We have already established that we will be using Kafka as the primary mechanism for sourcing events, but if you've never used streaming technology before, it might be challenging to understand how streaming is relevant to communication patterns. Let's look at a couple of real-world examples, one of which happens to be the core use case for the sample application.
Relating to real-world examples
Developers understand the concept of communication patterns between components, as they enable those patterns...