'How can i return response before job is'nt done in spring

I would make a simple restful api in spring boot. This api trigger a hard job that takes about 20 min.

Request is performed by another spring boot project. And request's wanted is only to trigger, not return data. I can't wait end of this job. So I have to separated api call and 20 minute job.

I think that async is not way...

How can i do this? Only way is to use a message broker?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source