0

I am looking at using Spring Cloud Task for offloading some some asynchronous jobs that need to be executed. I want to be able to track the results of these so the originating application can report whether it was successful or not. The examples don't seem to show how this would be done. Is there a REST API for reporting on and accessing the task execution status?

Example:

  1. Server A gets a request to create a resource
  2. Server A spins off a Spring Cloud Task to execute the creation
  3. Server A periodically checks whether the task is finished and its result and updates its stores to show that the resource has been successfully created or why it hasn't been creating (allowing re-attempting).

I am looking for a way to do this in such a way so that if Server A goes down for some reason, it can still recover and discover the results of the task.

1 Answers1

0

If they are simple, straightforward tasks, you can do it with the Spring Cloud Data UX. See my example here: https://github.com/djangofan/spring-cloud-data-example-0 ** requires Docker to run MariaDB

Otherwise, you'll need to define the task with a Maven Java project and then maybe schedule it with Jenkins? Jenkins will show you the job output in the console. ** requires Docker to run Jenkins

Kinda sounds like you need a Spring Cloud Data Stream, that is running and listening on a http input? You can totally do that with the UX above.

djangofan
  • 28,471
  • 61
  • 196
  • 289