Skip to main content

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

BoundaryMechanismEvent status
Expense to PayrollOutbound integration eventsConfirmed
Expense to NotificationOutbound integration eventsConfirmed
Expense to WorkflowHTTP start, state check, and callbackNo Expense workflow event
Expense to DocumentHTTP receipt storage and downloadNo receipt event
Inbound to ExpenseNone confirmedNot 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.cs
  • microservices/src/expense-service/Infrastructure/ExpenseDbContext.cs
  • microservices/src/expense-service/Messaging/OutboxRelayHostedService.cs
  • microservices/src/payroll-service/Messaging/PayrollReadModelConsumer.cs
  • microservices/src/notification-service/Messaging/NotificationEventConsumer.cs

See Also

Keywords

  • Expense events
  • Event Overview
  • Integration contracts

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-16
  • Review cycle: Quarterly