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
  • 1,881
  • 1
  • 16
  • 20
Klue
  • 1,237
  • 5
  • 22
  • 42

2 Answers2

0

Take a look at AsyncRestTemplate.

Deepak Sharma
  • 396
  • 3
  • 14
luboskrnac
  • 22,667
  • 9
  • 77
  • 88
0

AsyncRestTemplate is deprecated. Take a look at WebClient instead.

lkogs
  • 13
  • 9