Event store and idempotency
Each increment is stored with event time, event ID and item key. Together they form the idempotency key. Time buckets and event buckets keep Cassandra partitions narrow. Events sort in descending time order, which helps with resets. A retention policy deletes events after they are aggregated and archived.