I have an architecture question. Is there a spring...
# spring
b
I have an architecture question. Is there a spring-friendly approach for triggering long-running tasks? (through http for example). I would like to be able to query if that task is still running, failed, etc
I see that we have Async so that would solve the asynchronous aspect of the question. But what about status of the task, making sure it runs with a concurrency of 1 etc. And is there a way to do that for an unlimited amount of tasks (queuing them and having concurrency if wanted).
m
You can set up a Threadpool to execute Async tasks,
then another endpoint (JMX?) to query the status of the threadpool
If you create a qualified
ThreadpoolTaskExecutor
bean, you can use the
@Async(<<qualifier here>>)
on your background method to use it
b
So there is no higher level of abstraction
ok
m
not that i know of
b
thanks!