Description
HI! 🙂
Thank you for this project.
As we were going through the source , we found these blocking calls in AbstractIT
class of the Kafka.it
tests:
This method is called in another method where a timed await is called immediately after calling the above (sendToTopic) method:
Which got us thinking , if we are waiting anyway, then why use .block
operator and block the event loop.. Would it not be just fine to subscribe? 🤔 We tried the test cases with subscribe()
and they still passed..
We also evaluated the performance difference when using block vs subscribe (in terms of thread count and heap usage), and the subscribe version seem to outperform in both.
I know this is just test code but considering many users are and will be using it for their project, we might as well set good example by avoiding blocking calls wherever possible in a reactive chain/event loop.
We created a PR with the change in case you deem it fit: #130 :)