Skip to main content

Expense Event Contract Versioning

Summary

Expense maps all three outbound contracts with schema version 1. No second schema version or explicit multi-version dispatcher is implemented.

Confirmed behavior

ConcernFinding
Producer versionVersion 1 for all Expense mappings
Version locationCommon integration-event envelope
SerializationRuntime contract type with consistent shared JSON options
Additive compatibilityOptional approval, rejection, payment, and claimant details are appended nullable fields
Notification missing-version behaviorConsumer envelope defaults a missing transport version to version 1
Payroll version handlingPayroll parses the fields it needs and does not branch on schema version
Unsupported-version rejectionNot implemented
Contract registryNot implemented

The serializer omits null fields. This behavior and nullable trailing contract fields support additive evolution but do not constitute a formal compatibility guarantee.

Requires confirmation

Schema governance, compatibility testing, supported-version windows, deprecation, consumer upgrade sequencing, and unknown-version handling require confirmation.

Source References

  • microservices/src/contracts/Events/IntegrationEvent.cs
  • microservices/src/contracts/Events/ExpenseLifecycleEvents.cs
  • microservices/src/expense-service/Infrastructure/ExpenseDbContext.cs
  • microservices/src/shared-kernel/Outbox/IntegrationEventJsonSerializer.cs
  • microservices/src/notification-service/Messaging/NotificationEventConsumer.cs
  • microservices/src/payroll-service/Messaging/PayrollReadModelConsumer.cs

See Also

Keywords

  • Expense events
  • Contract Versioning
  • Integration contracts

Revision Information

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