Durabox 是一个事务性发件箱(Transactional Outbox)模式的 Go 实现,提供可靠的消息投递能力。
flowchart LR
A[业务事务] -->|同一事务写入| B[(Outbox 表)]
B -->|轮询/批处理| C[处理器]
C --> D[发布器]
D --> E[(消息中间件)]
classDef core fill:#0f172a,stroke:#38bdf8,color:#e2e8f0;
classDef store fill:#1f2937,stroke:#f59e0b,color:#fef3c7;
classDef bus fill:#111827,stroke:#22c55e,color:#dcfce7;
class A,C,D core;
class B store;
class E bus;
目录概览:
components/:核心 outbox 处理器与接口samples/postgres/:PostgreSQL 存储实现samples/examples/:Kafka / RabbitMQ 示例
快速开始:
- 引入核心包:
github.com/Gelei88/Durabox/components - PostgreSQL 存储:
github.com/Gelei88/Durabox/samples/postgres