RepositoryDockerfileITItaly
mtpatter

mtpatter/postgres-kafka-demo

Fully reproducible, Dockerized, step-by-step, demo on how to stream tables from Postgres to Kafka/KSQL back to Postgres. Detailed blog post published on Medium.

149sao
59fork
3issue
0lượt xem

🎉 Demo streaming dữ liệu từ Postgres đến Kafka/KSQL cùng postgres-kafka-demo

Một hướng dẫn thực tế, từng bước để biến Postgres thành nguồn dữ liệu real-time qua Kafka và KSQL.

Dự án postgres-kafka-demo của mtpatter là một demo có thể tái tạo đầy đủ, sử dụng Docker và docker-compose để minh họa quy trình streaming bảng dữ liệu từ Postgres đến Kafka, xử lý bằng KSQL, rồi ghi ngược trở lại Postgres. Dựa trên dataset Graduate Admissions từ Kaggle, dự án thể hiện rõ workflow từ việc load dữ liệu, cấu hình Kafka Connect bằng Debezium, đến các truy vấn KSQL tạo bảng real-time.

✨ Điểm nổi bật

  • Tái tạo hoàn toàn: Chỉ cần Docker và docker-compose là có thể chạy toàn bộ môi trường.
  • Streaming hai chiều: Dữ liệu từ Postgres được lấy vào Kafka bằng Debezium, sau đó được KSQL xử lý và ghi lại qua Kafka Connect sink.
  • Sử dụng Debezium: Connector source và sink được pulled từ hình ảnh Debezium đã được điều chỉnh.
  • KSQL real-time tables: Tạo các bảng KSQL tự động cập nhật mirror bảng Postgres, hỗ trợ join dữ liệu.
  • Dữ liệu thực tế: Dataset Graduate Admissions từ Kaggle với các bảng admission và research.
  • Hướng dẫn chi tiết: Cung cấp các command cụ thể để load dữ liệu, cấu hình connector, và thực hiện truy vấn KSQL.

💡 Vì sao值得关注

Dự án này nổi bật vì tính minh bạch và khả năng tái tạo cao, giúp người học dễ dàng theo dõi từng bước từ dữ liệu静态 đến streaming. Phù hợp cho các developer mới bắt đầu với Kafka, KSQL, và công nghệ streaming, cũng như những ai muốn prototype hệ thống real-time data pipeline. Việc kết hợp nhiều công cụ trong một environment thống nhất làm rõ cách các thành phần tương tác với nhau.


#Kafka #Postgres #Debezium #KSQL #Streaming #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryJava
debezium/debezium

Change data capture for a variety of databases. Please log issues at https://github.com/debezium/dbz/issues.

13.4k
Dec 1, 2026
RepositoryShell
confluentinc/demo-scene

Scripts and samples to support Confluent Demos, Talks, and Blogs. Not all of the examples in this repository are kept up to date. For automated tutorials and QA'd code, see https://github.com/confluentinc/tutorials/

1.6k
Nov 23, 2026
RepositoryPython
pathwaycom/pathway

Python ETL framework for stream processing, real-time analytics, LLM pipelines, and RAG.

62.0k
Nov 16, 2026
RepositoryJava
apache/kafka

Apache Kafka - A distributed event streaming platform

34.3k
Nov 27, 2026
RepositoryC++
redpanda-data/redpanda

Redpanda is a streaming data platform for developers. Kafka API compatible. 10x faster. No ZooKeeper. No JVM!

12.7k
Nov 12, 2026
RepositoryJava
provectus/kafka-ui

Open-Source Web UI for Apache Kafka Management

12.3k
Jul 26, 2024
RepositoryRust
MaterializeInc/materialize

The live data layer for apps and AI agents. Create up-to-the-second views into your business, just using SQL

6.4k
Nov 27, 2026
RepositoryJava
strimzi/strimzi-kafka-operator

Apache Kafka® running on Kubernetes

6.0k
Nov 30, 2026
RepositoryPython
damklis/DataEngineeringProject

Example end to end data engineering project.

1.4k
Dec 8, 2022