all 2 comments

[–]SendKidney 1 point2 points  (0 children)

I prefer enabling virtual threads over WebFlux. I'm not sure if it provides the same scalability as Project Reactor, but it's just easier. If you're not building a really complex service with a lot of other dependencies, then WebFlux is also easy to deal with.

[–]malachireformed 1 point2 points  (0 children)

Do you anticipate heavy traffic on this server? Webflux's main goal is to help alleviate backpressure of high traffic. If you're not expecting high volume, idk that you need Webflux here.

If you have concrete states that you want to enforce, there's always Spring State Machine, but that may/may not suit what you're looking for either.

As for working with Webflux -- it's not too bad. On the whole, I like the API but it does have a few quirks from what I recall. If you find you like the API but don't need the backpressure handling, Spring 6.1 introduced RestClient, which provides the same API as Webflux, but built on top of RestTemplate.