10.16

Explain how multiple operations can be executed on a stream using a publish-subscribe system such as Apache Kafka.


Each data source is assigned a unique topic name; the output of each operator is also assigned a unique topic name. Each operator subscribes to the topics of its inputs and publishes to the topics corresponding to its output. Data sources publish to their associated topic, while data sinks subscribe to the topics of the operators whose output goes to the sink.

To execute multiple operations, say Op1 and Op2, Op2 subscribes to the output topic of Op1. And Op1 publishes to its output topic.