I've been hearing that virtual threads are great for networking in Java, but I'm worried about their compatibility, especially since many libraries like Netty use JNI, which can cause issues with blocking operations. Can anyone share how they're successfully using virtual threads in networking scenarios, particularly when libraries they're working with depend on Netty?
1 Answer
It seems like you're equating networking solely with Netty. Have you considered using other networking libraries? There are plenty that might suit your needs without the JNI complications.
But my main use cases involve libraries that rely on Netty, like the HBase client, so I can't easily switch.