小编Tob*_*son的帖子

FS2 - How to route an element to a specific nested stream/pipe?

I want to run N nested streams/pipes in parallel and send each element to only one of the nested streams. Balance allows me to do this but I want to route elements with the same "key" to the same nested stream or pipe.

I can't see any functions to do this so I wrote a basic POC which broadcasts each element to every stream. The stream/pipe then filters only the elements it should handle (see below). This seems quite inefficient, …

scala scala-cats fs2

6
推荐指数
0
解决办法
437
查看次数

标签 统计

fs2 ×1

scala ×1

scala-cats ×1