james-project
james-project copied to clipboard
Move blocking readPair call to boundedElastic thread
Hi! 🙂
We noticed you did a great job in ensuring the reactive modules indeed stay reactive end to end. The mailbox module, however, was discovered to still have a blocking call in CassandraMessageMapper class as detected by BlockHound:
This PR fixes this code. We also re-ran the tests and verified the performance (in terms of heap usage) before and after the fix:
Before
After
Also read repair could be a good place for pseudo random usage aka non blocking...
There is no need for cryptographioc grade randomness for such an application.
Maybe otherall this could be a better fix. WDYT?