Apache Flink and Apache Kafka form a powerful combination for real-time data processing pipelines. Flink's Kafka connector is one of its most mature and widely-used integrations, providing exactly-once processing semantics and high throughput.
Kafka Topic → Flink Kafka Source → Stream Processing → Flink Kafka Sink → Output Topic
Flink's Kafka connector supports:
FlinkKafkaConsumer<String> consumer = new FlinkKafkaConsumer<>(
"sensor-data",
new SimpleStringSchema(),
properties
);
consumer.setStartFromLatest();
DataStream<String> stream = env.addSource(consumer);