feat(core): implement event outbox persistence
Add domain_events migration and SeaORM entity. Modify EventBus::publish to persist events before broadcasting (best-effort: DB failure logs warning but still broadcasts in-memory). Update all 19 publish call sites across 4 crates to pass db reference. Add outbox relay background task that polls pending events every 5s and re-broadcasts them, ensuring no events are lost on server restart.
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -896,6 +896,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
"chrono",
|
||||
"config",
|
||||
"erp-auth",
|
||||
"erp-common",
|
||||
|
||||
Reference in New Issue
Block a user