Asset Notification Consumer
Summary
Notification is the single confirmed consumer of asset events. It recognizes all six event names, projects the uniform payload once, resolves a recipient, and maps each event to an Asset.* template.
Audience
Engineering, integration, QA, architecture, security, and product reviewers.
Reference Content
Recognition and mapping
The resolver recognizes the six asset event types and maps each to a template key:
| Event type | Template key |
|---|---|
AssetRequested | Asset.Requested |
AssetAssigned | Asset.Assigned |
AssetReturned | Asset.Returned |
AssetRejected | Asset.Rejected |
AssetLostOrDamaged | Asset.LostOrDamaged |
AssetRetired | Asset.Retired |
All six share the uniform payload, so a single canonical projection (AssetEventPayload) parses every one; only the template key differs.
Template variables
The resolver populates a variable set from the payload: AssetCode, AssetName, AssetType, Status, Condition, Notes, ReturnDueDate, CompatId, AssignedToUserId, and LegacyEmployeeId. If the payload has no AssetCode, the resolver returns no intent.
Recipient resolution
The recipient is the asset holder, resolved in priority order:
- If
LegacyEmployeeIdis a positive integer, the recipient is the employee reference. - Otherwise, if
AssignedToUserIdis a positive integer, the recipient is that user. - Otherwise (an unassigned lifecycle event, such as an inventory retirement), the recipient is the
AssetAdminrole.
Email delivery occurs only when RecipientEmail is present on the payload; channels are In-App and Email.
Delivery and duplicate handling
The notification event consumer subscribes to the shared integration-events exchange, declares its queue, and hands each delivery to the dispatcher in its own scope, using the message's event identity. Duplicate-suppression and delivery-retry behavior are owned by the Notification module and documented there; this page records only that asset events flow through that same path.
Public-safety note
Template contents, message bodies, recipient identities, and delivery addresses are intentionally excluded. Only the recognized event names, template keys, and resolution logic are documented.
Source References
microservices/src/notification-service/Application/EventNotificationResolver.csmicroservices/src/notification-service/Messaging/NotificationEventConsumer.cs
Related Articles
See Also
Keywords
- Notification consumer
- Asset templates
- Recipient resolution
Revision Information
- Status: Draft
- Last reviewed: 2026-07-17
- Review cycle: Quarterly