You must implement near-real-time analytics with exactly-once effect for aggregates stored in a relational system, but the source is an at-least-once stream. Which design most directly achieves exactly-once effect?

Answer

Apply updates using UPSERTs with a deterministic idempotency key per aggregate window

Explanation

Exactly-once effect can be obtained by making the write path idempotent using a deterministic key for each update window. UPSERT with that key prevents duplicate side effects from replays.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list