EveStreamEventDeduplicator
NexusLabs.Eve¶
EveStreamEventDeduplicator Class¶
Tracks which durable eve stream events have already been consumed.
Inheritance System.Object 🡒 EveStreamEventDeduplicator
Remarks¶
Deduplication is keyed on Id. It absorbs a reconnect that overlaps already-handled events, a rewind to an earlier start index, and a persisted log merged with the prefix a live stream replays. A retried step is not a duplicate: it is emitted again under a new identifier.
The remembered set is unbounded because a bounded one cannot survive a rewind past its capacity. Callers that retain nothing per event should bound their reads with the session stream cursor instead of using this type.
Instances are not thread-safe and are intended to be consumed by a single stream reader.
Properties¶
EveStreamEventDeduplicator.Count Property¶
Gets the number of event identifiers currently remembered.
Property Value¶
Methods¶
EveStreamEventDeduplicator.Admit(EveStreamEvent) Method¶
Records streamEvent and reports whether it should be processed.
Parameters¶
streamEvent EveStreamEvent
The stream event to admit.
Returns¶
System.Boolean
true when the event has not been admitted before, or carries no durable
identifier; false when its identifier was already admitted and the caller
should drop it.
Exceptions¶
System.ArgumentNullException
streamEvent is null.
Remarks¶
Events persisted before stream protocol version 20 carry no identifier and are always admitted because there is nothing to deduplicate on.
EveStreamEventDeduplicator.Clear() Method¶
Forgets every remembered identifier so a new session can reuse this instance.