Package com.babelqueue.idempotency
Interface Store
- All Known Implementing Classes:
InMemoryStore
public interface Store
A pluggable record of message ids that have already been processed, keyed on the
envelope's
meta.id. The reference InMemoryStore is for tests and
single-process consumers; production backends (Redis, a database table) implement the
same three methods.
The contract is "seen-set" dedupe: it answers "was this id processed?", not "what did it return" — queue handlers have no response to replay. It provides post-success dedupe under at-least-once delivery with idempotent handlers, not exactly-once and not in-flight concurrency locking. A transactional / outbox mode is a documented future direction (ADR-0022).
-
Method Summary
Modifier and TypeMethodDescriptionvoidDrops an id from the store (manual eviction; a backend may also expire ids).voidRecords this message id as processed.booleanWhether this message id has already been processed (remembered).
-
Method Details
-
seen
Whether this message id has already been processed (remembered). -
remember
Records this message id as processed. -
forget
Drops an id from the store (manual eviction; a backend may also expire ids).
-