Skip to main content

Message identity and lifecycle

Nereus Delay uses different identities for different retry and concurrency questions. Treating them as one ID would make deduplication and stale-result handling ambiguous.

Identity layers​

IdentityStable acrossChanges whenProtects against
commandId + commandHashPhysical retries of one logical CommandA new business operation is preparedRe-enqueue ambiguity and conflicting reuse of a Command ID
delayMessageIdSchedule, Cancel, Reschedule, and delivery lifecycleA different logical delayed message is createdAccidental replacement of an existing message
generationOne scheduling version of a messageReschedule creates a new versionA stale callback or retry changing the current version
Attempt identityOne admitted destination side effectA new attempt is durably admittedMixing evidence from different publish attempts

The same commandId with the same hash is an idempotent retry. The same commandId with different command semantics is a conflict. Idempotency is bounded by source-ordered time fences rather than a local wall-clock cleanup guess.

Message lifecycle​

This diagram is a reader model. The runtime also maintains internal bookkeeping for attempts, evidence, retention, and recovery.

Why Reschedule creates a generation​

Reschedule does not mutate a producer callback already in flight. Instead, it creates a new generation with a new delivery window. Any old Claim, Attempt, or callback still names the earlier generation and cannot silently overwrite the current one.

The destination may still observe an older attempt if it had already crossed durable Publish Admission. That is why the service reports evidence and uncertainty instead of describing every late result as a clean cancellation.

Terminal does not always mean immediately deletable​

Terminal message state, command results, payload references, receipts, and compact identity tombstones have separate retention duties. Recovery Floor and source time-fence rules decide when older state can no longer be needed by an allowed checkpoint or a late retry.

Continue with Cancel and reschedule and delivery guarantees and uncertainty.