33 lines
1.7 KiB
Markdown
33 lines
1.7 KiB
Markdown
# Event Ownership Matrix — Stage 2
|
|
|
|
Правило: у каждого типа события есть **один owner**, один producer и явные consumers.
|
|
Событие без owner не публикуется в production.
|
|
|
|
| event_type | owner | producer | consumers | retention | PII |
|
|
|---|---|---|---|---|---|
|
|
| media.request.created | Roman / Media | Seerr adapter | notification bot, Audit | 90d | no |
|
|
| media.request.approved | Roman / Media | Seerr adapter | notification bot | 90d | no |
|
|
| media.playback.started | Roman / Media | Jellyfin adapter | Audit, analytics | 30d | user id |
|
|
| media.work.added | Roman / Media | Jellyfin adapter | Buryans One, search | 365d | no |
|
|
| media.work.updated | Roman / Media | Jellyfin adapter | Buryans One | 365d | no |
|
|
| audit.finding.opened | Roman / Audit | Audit 360 | Nexus | 365d | no |
|
|
| audit.finding.closed | Roman / Audit | Audit 360 | Nexus | 365d | no |
|
|
| identity.user.created | Roman / SSO | Authentik adapter | Audit, Buryans One | 365d | email |
|
|
| identity.user.disabled | Roman / SSO | Authentik adapter | Audit, access | 365d | email |
|
|
| home.state.changed | Roman / Home | Home Assistant adapter | Buryans One | 30d | no |
|
|
| agent.task.requested | Roman / Agents | bot adapter | runner | 30d | no |
|
|
| system.service.down | Roman / SRE | monitor adapter | notification bot | 90d | no |
|
|
| system.service.up | Roman / SRE | monitor adapter | notification bot | 90d | no |
|
|
|
|
## Adapter contract
|
|
|
|
Adapter:
|
|
|
|
1. validates the CloudEvents envelope;
|
|
2. supplies a stable `idempotency_key`;
|
|
3. writes to `events.outbox` in the same transaction as its local change;
|
|
4. never publishes directly to NATS;
|
|
5. declares one event type from this matrix.
|
|
|
|
Relay owns JetStream publish. Consumer owns inbox/effect idempotency.
|