My use case is as follows: I get events that sometimes happen in packages. If a splash occurs, I only need to process it once. Debounce does this.
However, debounce only gives me the last element of the package, but I need to know about all the elements in the package to aggregate them (using a flat map).
This can be done with a temporary window or a buffer, however, these are fixed intervals, so the buffer / window timeout can occur in the middle of the packet, therefore splitting the packet into 2 parts for processing instead of 1.
So what I would like is something like
. . event: a . . -> a . . . . . .event: b .event: c .event: d . .-> b,c,d . . . . .event : e . . -> e .
rxjs reactivex
Seba Kerckhof
source share