Asset Messaging and Outbox
Event path
Six domain events map one-to-one to shared Requested, Assigned, Returned, Rejected, LostOrDamaged, and Retired contracts. Mapping occurs during DbContext save, validates required lifecycle data, serializes through Shared Kernel, and stages the outbox in the same database save as aggregate changes.
The hosted service repeatedly resolves a scoped processor, processes a bounded batch, logs iteration failures, and leaves failed/pending records available for retry. Shared messaging registers the event bus, publisher, and outbox processor. Asset Service has no local inbound consumer; a processed-event ledger is modeled for future consumption. Workflow uses HTTP/callback rather than asset lifecycle messaging. Broker topology, delivery guarantees, dead-letter governance, retention, and operational alerting are not established here.
Requires confirmation
Production ownership, authorization governance, operational policy, and future architecture require confirmation where the source does not enforce them.
Source References
microservices/src/asset-service/Infrastructure/AssetDbContext.csmicroservices/src/asset-service/Messaging/OutboxRelayHostedService.csmicroservices/src/contracts/Events/AssetLifecycleEvents.csmicroservices/src/shared-kernel/Extensions/MessagingExtensions.cs