title: Track status of multiple async requests when using Spring @Async
body: <p>I am using spring boot for developing services in my application.</p>
  
  <p>I have a scenario where-in the request submitted to the back-end would take some time to complete.</p>
  
  <p>To avoid waiting the client I want to return the response immediately with a message your request has been accepted. The request would be in progress in a background thread.</p>
  
  <p>I see Spring provides the @Async annotation which can be used to create a separate processing thread from the main thread and using that I am able to offload the processing in a separate thread.</p>
  
  <p>What I want to do is when I return the initial response as accepted I also want to provide the client with a tracking key/token which the client can later use to check the status of the request.</p>
  
  <p>Since there can be multiple clients who would be accessing the service there should be a way of uniquely identifying each client's request from another.</p>
  
  <p>I see there is no such feature in Spring Async or Future which can return a tracking id as such. </p>
  
  <p>One possibility I see it to put the Future returned in HttpSession and later use that to check for the status by the client. But, I prefer not to use HttpSession and want my services to be stateless.</p>
  
  <p>Is there any way/approach I can accomplish my requirement.</p>
  
  <p>Thanks,</p>
  
  <p>BS</p>