Temporal Workflows with Java 21 and Virtual Threads - Sample projects for reference

Hi,

I’m new and a beginner to workflow orchestration frameworks and I’m currently evaluating a few Temporal and OSS-Conductor at the moment. Are there any references for Temporal workflows implemented using Java 21 and leveraging virtual threads.

I see that Add support for virtual workflow threads by Quinn-With-Two-Ns · Pull Request #2297 · temporalio/sdk-java · GitHub has introduced support for Virtual threads.

Please share any useful resources that demonstrates a few temporal workflows implemented using Java 21 using the temporal java sdk

Also, recently I came across a temporal resource that introduced spring-boot-temporal-starter. The description mentioned that the project is very close to GA. Any tentative dates for this release?

I’m looking forward to tyring out these. Please help me in this

Hi Aravid,

A workflow using virtual threads looks no different then a workflow not using virtual threads. All you need to do to enable virtual threads is set setUsingVirtualWorkflowThreads on WorkerFactoryOptions. The SDK will then use virtual threads for all threads created inside a workflow.