Skip to main content

Employee Payroll Integration

Summary

Payroll Service has a hosted read-model consumer for selected Employee lifecycle messages and maintains Payroll-owned employee workforce information. Employee Service creates corresponding outbox records, but its relay activation remains unconfirmed.

Audience

  • Backend developers and QA engineers
  • DevOps engineers, payroll administrators, and solution architects

Purpose

Describe the confirmed projection relationship without documenting event payloads or payroll rules.

Confirmed interaction

  • Employee owns the authoritative employee lifecycle and workforce profile within its boundary.
  • Employee persistence creates shared-contract outbox records for selected lifecycle changes.
  • Payroll registers a hosted read-model consumer.
  • The Payroll consumer handles employee creation, employee update, and employment-status change categories as part of a larger workforce/HR projection stream.
  • Payroll owns its local employee payroll profile and uses it within the Payroll boundary.

There is no direct Employee-to-Payroll HTTP client in Employee Service. Payroll calculation and schema are outside this epic.

Delivery caveat

The Employee host does not register a hosted outbox relay. Therefore, implemented Payroll consumption does not alone prove that Employee messages are published in every environment. End-to-end delivery Requires confirmation.

Requires confirmation

  • Production publication, replay, monitoring, and reconciliation.
  • Handling of department/manager changes beyond the confirmed consumer categories.
  • Staleness expectations for Payroll workforce data.
  • Operational response when Employee and Payroll views differ.

Source References

  • microservices/src/employee-service/Infrastructure/EmployeeDbContext.cs
  • microservices/src/employee-service/Infrastructure/Persistence.cs
  • microservices/src/payroll-service/Messaging/PayrollReadModelConsumer.cs
  • microservices/src/payroll-service/Program.cs
  • documentation-inventory/hr-suit-backend-source-inventory.md

See Also

Keywords

  • Payroll projection
  • Workforce read model
  • Eventual consistency

Revision Information

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