-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
None
-
False
-
If Release Note Needed, Set a Value
-
Set a Value
In RequestCorrelator.receiveMessageBatch(MessageBatch), we iterate through the batch and process messages one by one. Messages can be either requests, which need to be delivered in order (unless they're OOB) and can take some time, or responses, which can be delivered in random order.
It would be faster to deliver responses (and OOB requests) in parallel to (regular) requests. This can be done with batch.stream().parallel() for the first case and batch.stream() for the latter case.
Todos:
- UPerf should have better perf with this implemented
- Add MessageBatch.stream(Predicate<Message>) to prefilter for requests and responses
The attached sample shows how to do this.