Suppose I have 3 publishers and 1 processor. The publishers emits items in the form {key: <integer>, value: <object>, publisher_id: <string>}
.
The publishers makes IO operations, so:
- On the one hand, I'd like the publishers to work on (roughly)
N
items at a given moment. - On the other hand, I'd like the consumer to merge the items to one single record (i.e.
{key: <integer>, values: <list>}
)
I've actually already implemented a FluxProcessor
that has an internal storage (ConcurrentHashMap
) to keep all the items. It manually request()
new items whenever CAPACITY wasn't reached.
I'd like to know if there's a built-in functionality to do that with RxJava(2)/ Spring Reactor API?