Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kotlin Flow Replay Functionality

Is there a planned or existing way to replicate RX's replay/refcount functionality in Kotlin Flow?

I need something between a broadcast channel's multicast facility (so consumers don't fight over events), and a regular channel's caching/suspension functionality (so consumers receive some backlog of events).

like image 932
Andy Avatar asked Jul 24 '26 11:07

Andy


1 Answers

Maybe a bit late, but still might be useful. There's an open issue to implement this behavior, so sooner or later we'll have it. Also, there's a discussion about connectable flow, but I can't see decision of they implementing it or not.

UPD: Looks like KEEP-1261 is outdated and 1716 is more relevant now.

like image 56
MightySeal Avatar answered Jul 27 '26 08:07

MightySeal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!