My question is:
If I receive multiple event sequences in event loop threads, how could I process every sequence blocking and ordered but different sequences be processed by the whole worker thread pool.
Use case:
I have gRPC client in a vert.x with 4 event loop and 20 worker threads. I start remote calls in 10 threads.
- Every call receives 2 events StreamObserver.onNext and StreamObserver.onCompleted
- On every such event I'd like to start blocking task in such way that for a gRPC call onNext and onClose are ordered, while for different gRPC calls events are executed in different worker threads.
The goal is to distribute call execution to as much worker threads as possible but events for single call to be ordered.
- If I use executeBlocking with ordered true - they will be executed in a worker thread per event thread.
- If false - there will be no order in processing onNext and onClose.