Attendance Messaging and Outbox
Summary
Attendance uses domain events and a transactional outbox to decouple request commits from broker publication.
Audience
Backend developers, integration engineers, architects, DevOps engineers, and QA engineers.
Event flow
Attendance aggregates raise punched, submitted, approved, rejected, and reopened domain events. During SaveChanges, the DbContext maps recognized domain events to Contracts integration events and stores outbox messages in the same persistence commit. The aggregate queue is then cleared. A hosted relay periodically resolves the shared outbox processor, reads pending or failed messages in bounded batches, publishes through the broker adapter, and marks success or failure.
Correlation metadata is carried where available. Delivery is retry-oriented and at-least-once should be assumed; consumers remain responsible for idempotency. No inbound Attendance consumer, dead-letter workflow, maximum retry policy, ordering guarantee, or end-to-end delivery objective is confirmed. Full payload contracts belong in the future Events epic.
Source References
microservices/src/attendance-service/Domain/Attendance/AttendanceDomainEvents.csmicroservices/src/attendance-service/Infrastructure/AttendanceDbContext.csmicroservices/src/attendance-service/Infrastructure/Persistence.csmicroservices/src/attendance-service/Infrastructure/OutboxRelayHostedService.csmicroservices/src/shared-kernel/Messaging/OutboxProcessor.csmicroservices/src/integration-service/appsettings.json
Related Articles
See Also
Keywords
- Attendance Service
- Attendance Messaging and Outbox
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly