Expense Event Overview
Summary
Expense uses domain events for approved, rejected, and paid transitions. SaveChanges converts those events to shared integration contracts and durable outbox records; a hosted relay publishes them after the local transaction commits.
Audience
Developers, architects, QA, operations, and support teams working across Expense, Payroll, and Notification.
Confirmed architecture
Expense is the producer and contract mapper. The shared serializer and outbox processor provide delivery infrastructure. Payroll maintains its own expense projection; Notification resolves notification intent and performs delivery through its own pipeline.
Expense does not consume integration events. Its processed-event persistence is a foundation with no current subscriber use.
Integration boundaries
| Boundary | Mechanism | Event status |
|---|---|---|
| Expense to Payroll | Outbound integration events | Confirmed |
| Expense to Notification | Outbound integration events | Confirmed |
| Expense to Workflow | HTTP start, state check, and callback | No Expense workflow event |
| Expense to Document | HTTP receipt storage and download | No receipt event |
| Inbound to Expense | None confirmed | Not implemented |
Requires confirmation
Broker operating ownership, projection freshness objectives, end-to-end monitoring, replay procedures, and future inbound-event ownership require confirmation.
Source References
microservices/src/expense-service/Domain/Expense/ExpenseDomainEvents.csmicroservices/src/expense-service/Infrastructure/ExpenseDbContext.csmicroservices/src/expense-service/Messaging/OutboxRelayHostedService.csmicroservices/src/payroll-service/Messaging/PayrollReadModelConsumer.csmicroservices/src/notification-service/Messaging/NotificationEventConsumer.cs
Related Articles
See Also
Keywords
- Expense events
- Event Overview
- Integration contracts
Revision Information
- Status: Draft
- Last reviewed: 2026-07-16
- Review cycle: Quarterly