Hi
Currently, I am working on Loom project which enables virtual threads
for Java.
https://wiki.openjdk.java.net/display/loom/Main
As one of real-life tests it would be interesting to run Kafka using
virtual threads. However it might require some support in Kafka for
this. It is needed to add ability to start some threads as "virtual". Do
you know if anyone is interested and could help me with this?
Here are more details:
Basically, the virtual thread is a sub-class of java.lang.Thread. So it
is need to refactor code to avoid subclassing of thread and factorize
thread creation. I placed "example" fix what should be done to add
ability to run KafkaThread as virtual thread. It is just to demonstrate
the overall idea of changes.
https://github.com/lmesnik/kafka/commit/872a2d5fd57b0c76878eece6c54c783897ccbf5e
I want to check with you if it is a good approach for Kafka and are
there are other places to be updated. There is no plan to push such
support in mainline yet. Also, no plans to make any significant changes.
But if they want we could do it.
What do you think about this?
Leonid