I want to use the RX Throttle
method to 'debounce' events, such that the subscription doesn't fire if more messages are seen within a given time period.
This works well, but I also want to prevent Throttle
from debouncing indefinitely, such that the subscription will always fire if some timeout passes regardless of whether more messages have been seen.
For example, as long as new messages are seen at least once every 1 second, don't fire the subscription - unless 10 seconds has passed since we started debouncing, in which case do fire.
I've been playing around with combinations of Throttle
with other RX methods, but I can't figure out how to do this.