A PostgreSQL extension that enables sending messages directly to Apache Kafka from within the database.
pg_kafka is a PostgreSQL extension that enables database-driven applications to produce messages directly to Apache Kafka. It solves the problem of streaming database changes to external systems by providing a SQL interface to Kafka, overcoming the limitations of PostgreSQL's native LISTEN/NOTIFY mechanism. The extension allows developers to capture row-level changes and publish them as Kafka messages for event-driven architectures.
Database administrators and backend developers working with PostgreSQL who need to integrate database changes with Kafka-based event streaming systems or microservices architectures.
Developers choose pg_kafka because it provides a simple, database-native way to stream data changes to Kafka without requiring external CDC tools or complex application logic. Its trigger-based approach and SQL interface make it easier to implement than decoding PostgreSQL's write-ahead log directly.
INACTIVE: A PostgreSQL extension to produce messages to Apache Kafka.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enables sending messages to Kafka topics directly from PostgreSQL using SQL queries, eliminating the need for external middleware or complex application logic.
Allows automatic message production on INSERT, UPDATE, and DELETE operations via triggers, seamlessly capturing row-level changes for event-driven workflows.
Uses familiar SQL syntax like SELECT kafka.produce(), making it accessible to database developers without requiring new API learning.
Addresses PostgreSQL's LISTEN/NOTIFY payload size limitation of 8000 bytes, supporting larger data streams suitable for modern event architectures.
Version 0.0.1 indicates immaturity, with potential for bugs, limited features, and sparse documentation compared to established alternatives.
Requires compiling with dependencies like librdkafka, editing postgresql.conf, and restarting PostgreSQL, which can be cumbersome and error-prone.
No built-in retry mechanisms or fault tolerance for Kafka unavailability, risking data loss or transaction failures in production scenarios.
Tied to specific versions of Kafka (0.8.1+) and librdkafka (0.8.x), which may not align with modern or updated infrastructure stacks.