Is an async jersey rest endpoint possible?

I’m trying to develop a REST API method for Confluence data center 9.2.0 where it itself needs to make a web request. Sometimes this request can take 10 seconds to get back.

I don’t want to hog / block the thread while waiting, so I thought I would implement an asynchronous function (for example). I’ve also tried a ton of variations of cookie cutter asynchronous jersey endpoints and none of them work, they all return an immediate response.

I thought that with platform 7 and a bunch of upgrades to the underlying packages, the version of jax.rs (now jakarta) should be updated enough to support these asynchronous features.

I got to thinking that maybe Atlassian just disabled that, maybe in tomcat or somewhere else.

I am okay with writing a polling procedure if that’s what it comes to, just wanted to check because I don’t see any explicit documentation saying it’s impossible.