Time-based domain events – how to deal with time on Kafka
summary
Prototype schedules and fires domain events using Kafka Streams' low-level processor API with a punctuator that uses wall‑clock timers to emit events at their effective date. State is stored in RocksDB‑backed state stores keyed by effectiveDate+employeeId, a cleaner deletes fired entries, and extra stores plus processors handle postponements and cancellations. Tradeoffs: relies on RocksDB ordering internals, no TTL so disk grows, duplicates are possible so downstream must be idempotent, and the approach is testable but more complex than the DSL.
AI-written summary · about
