Count-triggered emission. The accumulator emits one snapshot every
n source events. The first emission fires on the nth event, not
the first.
Output timestamps are the source event's timestamp at the
moment of firing (same as Trigger.event()).
Data-driven — the counter only advances on event ingestion.
No timer; quiet periods don't fire snapshots.
Per-partition counting. When applied via a per-partition
partitionBy(...).rolling(...), each partition counts
independently — a count trigger does not synchronise emission
across partitions. Use Trigger.clock for cross-partition
synchronisation.
Useful for very hot metrics where event-time boundaries lag during
bursts but per-event emission is too noisy (e.g. row stale times,
payload sizes). For "every 30s OR every 1000 events," compose with
Trigger.any (post-v0.13.2 — see PLAN).
Count-triggered emission. The accumulator emits one snapshot every
nsource events. The first emission fires on thenth event, not the first.Trigger.event()).partitionBy(...).rolling(...), each partition counts independently — a count trigger does not synchronise emission across partitions. UseTrigger.clockfor cross-partition synchronisation.Useful for very hot metrics where event-time boundaries lag during bursts but per-event emission is too noisy (e.g. row stale times, payload sizes). For "every 30s OR every 1000 events," compose with
Trigger.any(post-v0.13.2 — see PLAN).