1

My question might be quite basic.

I have a Spring MVC (Spring Boot) REST api, and multiple Spark workers that send parallel HTTP GET requests to this REST api (e.g. 4 workers on different nodes -> 4 parallel HTTP requests). I want my REST api be able to process these requests in parallel.

How can I do it? Should I use callbacks and DeferredResult inside my REST api? Any example would be really helpful.

Chathuranga Tennakoon
  • 2,059
  • 1
  • 18
  • 20
Klue
  • 1,317
  • 5
  • 22
  • 43

2 Answers2

0

Take a look at AsyncRestTemplate.

Deepak Sharma
  • 456
  • 4
  • 15
luboskrnac
  • 23,973
  • 10
  • 81
  • 92
0

AsyncRestTemplate is deprecated. Take a look at WebClient instead.

lkogs
  • 53
  • 10