Apache Flink runs data-processing jobs that ingest, transform, and output data. It handles both continuously arriving, unbounded streams and bounded datasets with a defined start and end. This makes it an option when a pipeline needs real-time processing alongside batch-style work. section 8.4.2
Put routing logic between producers and consumers
Suppose downstream services need different kinds of address changes. Kafka brokers do not inspect message content; putting routing in the producer complicates upstream logic, while making every consumer filter wastes effort. A streaming application can read address events, select by address type, and publish to separate shipping and billing topics. Flink is one framework for building this kind of consume-transform-re-emit application. section 1.5.3
A Flink job starts with a source connector and ends with a sink connector. Sources can include Kafka topics, files, and batch database queries; predefined connectors also cover other databases and messaging systems. Compared with Kafka Streams, which centers on Kafka as its source and sink, Flink offers more flexibility for pipelines spanning external systems. That flexibility is a reason to consider it—not a reason to add it to every Kafka pipeline. section 8.4.2 section 8.7
Figure 8.21 The Flink architecture. The Flink Client is responsible for transforming a program into a graph, which is submitted to the JobManager. JobManager converts it into an ExecutionGraph and deploys tasks to available TaskManagers.
The runtime diagram shows how a Flink Client turns a program into a graph, the JobManager prepares its execution graph, and TaskManagers receive the deployed tasks. section 8.4.2

