My question is how can I configure MongoDB, Redis, and R2DBC to use virtual threads for their connection pools? Currently, when a request uses a virtual thread to fetch data from the database and returns it, the processing is taken over by a configured thread pool which is not managed by Spring Boot's virtual threading. As a result, the thread handling the data upon return is no longer a virtual thread but one from the database thread pool. How can I ensure that virtual threads are used throughout this process?
Comment From: bclozel
As far as I know, we have linked all known virtual threads support in our auto-configurations to the spring.threads.virtual.enabled property. We're already configuring a virtual threads enabled task executors for the Jedis and Lettuce Redis drivers. We're not aware of any additional support in MongoDB, Redis or R2DBC drivers.
Please create actionable issues, for example pointing to existing virtual threads support that we missed for a library we auto-configure. For general questions about virtual threads, use StackOverflow.