Skip to main content

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 typeTemplate key
AssetRequestedAsset.Requested
AssetAssignedAsset.Assigned
AssetReturnedAsset.Returned
AssetRejectedAsset.Rejected
AssetLostOrDamagedAsset.LostOrDamaged
AssetRetiredAsset.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:

  1. If LegacyEmployeeId is a positive integer, the recipient is the employee reference.
  2. Otherwise, if AssignedToUserId is a positive integer, the recipient is that user.
  3. Otherwise (an unassigned lifecycle event, such as an inventory retirement), the recipient is the AssetAdmin role.

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.cs
  • microservices/src/notification-service/Messaging/NotificationEventConsumer.cs

See Also

Keywords

  • Notification consumer
  • Asset templates
  • Recipient resolution

Revision Information

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