PostgresChangeDataCaptureOutboxSample
Tiny event driven sample application, using change data capture, via Npgsql, to help implement the outbox pattern
Install / Use
/learn @joaofbantunes/PostgresChangeDataCaptureOutboxSampleREADME
PostgreSQL Change Data Capture Outbox Sample
Tiny sample application showing how we could use Change Data Capture with PostgreSQL to publish our outbox messages
NOTE It should go without saying that this is not production ready.
About the solution
The solution is comprised of 3 projects
- Producer - Application that stores a collection of messages in the outbox table. Doesn't do anything else, as the OutboxPublisher is in charge of doing the actual publishing.
- OutboxPublisher - Hooks into PostgreSQL Write Ahead Log to read new entries in the outbox table and publish to Kafka
- Consumer - Subscribes to events, logging every time a new one arrives, just to show that the messages put in the outbox are being published to Kafka.
- Events - Contains the events that are used in the solution. Also contains interfaces (and implementations) for publishing and subscribing to events.
In the root of the solution, there's a Docker Compose file to spin up the necessary dependencies, which are PostgreSQL, Kafka and Seq.
Using JSON serialization for the events, good enough for demo purposes. For production scenarios, something like ProtoBuf or Avro are probably better options.
Related Skills
feishu-drive
338.0k|
things-mac
338.0kManage Things 3 via the `things` CLI on macOS (add/update projects+todos via URL scheme; read/search/list from the local Things database)
clawhub
338.0kUse the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com
yu-ai-agent
1.9k编程导航 2025 年 AI 开发实战新项目,基于 Spring Boot 3 + Java 21 + Spring AI 构建 AI 恋爱大师应用和 ReAct 模式自主规划智能体YuManus,覆盖 AI 大模型接入、Spring AI 核心特性、Prompt 工程和优化、RAG 检索增强、向量数据库、Tool Calling 工具调用、MCP 模型上下文协议、AI Agent 开发(Manas Java 实现)、Cursor AI 工具等核心知识。用一套教程将程序员必知必会的 AI 技术一网打尽,帮你成为 AI 时代企业的香饽饽,给你的简历和求职大幅增加竞争力。
