Asset Event Idempotency
Summary
Asset event delivery is at-least-once by design; a failed publish is retried and may result in a duplicate. Producer-side deduplication does not exist. A foundation ProcessedIntegrationEvent ledger exists for future inbound consumption but is not yet used.
Audience
Engineering, integration, QA, architecture, security, and product reviewers.
Reference Content
Delivery semantics
| Concern | Verified behavior |
|---|---|
| Delivery intent | At-least-once (failed rows retried) |
| Producer deduplication | None |
| Event identity | EventId (GUID) per contract, also on the outbox row |
| Inbound idempotency ledger in asset-service | ProcessedIntegrationEvent (exists, unused) |
| Consumer duplicate handling | Owned by Notification (keys on event identity) |
Producer side
The outbox processor re-fetches rows whose status is Pending or Failed. A row that failed to publish is retried on the next pass. There is no producer-side check that the same EventId was already delivered; if a broker acknowledged a publish that the processor recorded as failed, a duplicate could be produced. Consumers are therefore expected to be idempotent.
Asset-service inbound ledger (foundation)
ProcessedIntegrationEvent records one row per consumed integration EventId, with EventType, TenantId, CorrelationId, SourceService, Outcome, and ProcessedOnUtc. Its source comment states it is "for when this service subscribes." No inbound consumer writes to it in the verified source, so it is a Foundation structure, not active idempotency.
Consumer side (Notification)
The notification consumer keys each delivery on its event identity and dispatches within a scope; duplicate suppression and delivery retry are owned by the Notification module and documented there. Asset events use that same path.
Requires confirmation
Whether a consumer other than Notification will require the asset-service inbound ledger, and the exactly-once expectations for downstream consumers, require confirmation.
Source References
microservices/src/asset-service/Infrastructure/AssetDbContext.csmicroservices/src/shared-kernel/Messaging/OutboxProcessor.csmicroservices/src/notification-service/Messaging/NotificationEventConsumer.cs
Related Articles
See Also
Keywords
- Idempotency
- At-least-once
- Processed integration event
Revision Information
- Status: Draft
- Last reviewed: 2026-07-17
- Review cycle: Quarterly