Skip to main content

Expense Event Publishing Flow

Summary

Publishing is split into a transactional write phase and a later broker-delivery phase. Request completion does not wait for broker publication.

Confirmed flow

The mapper creates a new integration-event identity for each mapped domain event. The domain event identity is not reused. Correlation and causation values are currently not populated by Expense mapping.

The shared serializer uses consistent web-style JSON behavior and omits null values. No direct publisher call exists in the command or aggregate.

Transaction boundary

Claim state, audit, timeline, receipt-reference changes when applicable, and mapped outbox intent participate in the EF save. Broker publication and all downstream consumer work occur outside that transaction.

Requires confirmation

Trace-lineage enrichment, publish latency objectives, event observability ownership, and cross-service transaction policy require confirmation.

Source References

  • microservices/src/expense-service/Infrastructure/ExpenseDbContext.cs
  • microservices/src/shared-kernel/Outbox/IntegrationEventJsonSerializer.cs
  • microservices/src/shared-kernel/Messaging/OutboxProcessor.cs
  • microservices/src/expense-service/Messaging/OutboxRelayHostedService.cs
  • microservices/src/expense-service/Program.cs

See Also

Keywords

  • Expense events
  • Publishing Flow
  • Integration contracts

Revision Information

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