You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose the outbox insert sequence to consumers as a message header #358
Consumers that keep a projection need a monotonic value per ordering key to reject stale or redelivered events ("apply only if newer than what I stored"). Today an application has to produce that value itself, usually with a counter row per aggregate that every writer locks. Ordered lanes now follow a database-assigned insert sequence (#353, shipped in #366 at c548832, D50). The remaining work is to project that value into dispatch and carry it on the message; OutboxRecord does not currently expose it.
Prerequisite #353 is complete; there is no remaining dependency on it.
Proposal
When an ordered row is dispatched, add its insert sequence as a header under the relayer. prefix.
Expose it on the consume side as a typed, lazily read value on the message context, absent when the producer did not supply it.
Document what it guarantees: increasing in commit order for sequential transactions on one ordering key from one outbox table; not gap-free; not comparable across outbox tables or tenants; no defined order for genuinely concurrent transactions.
Acceptance criteria
Real-PostgreSQL test: two sequential commits for one ordering key are received with increasing sequence values, including when the later commit has the smaller UUIDv7.
The header is written without a per-message string allocation; state the per-message cost in the PR.
Unordered routes either omit the header or document that the value carries no ordering meaning there.
website/docs/reference/ordered-dispatch.md shows a version-guarded consumer using the value.
Activity
Verify sequence metadata through durable consume telemetry (#358)
Preserve decoded header name cache for ordered sequences (#358)
Expose ordered outbox insert sequences to consumers (#358)
Verify sequence metadata through durable consume telemetry (#358)
Preserve decoded header name cache for ordered sequences (#358)
Expose ordered outbox insert sequences to consumers (#358)
Verify sequence metadata through durable consume telemetry (#358)
Preserve decoded header name cache for ordered sequences (#358)
Expose ordered outbox insert sequences to consumers (#421)