1

I'm new in reactive programming in java and I'm trying to make an microservice that aggregate calls from 3 other microservices.

I can't figure out how to handle this 3 rest calls in asynchronous way and then aggregate the result. I have a simple business all the three methods returns boolean and I want to make an or on them.

Can I do this in Java with Spring boot 2?

Thanks

Dorin
  • 2,167
  • 4
  • 20
  • 32
  • if you want to call the other microservices, take a look at RestTemplate of spring boot – Holm Feb 21 '19 at 14:48
  • I'm using feign, but I can change. It's a way to call with RestTemplate asynchronous ? – Dorin Feb 21 '19 at 14:59
  • 1
    https://stackoverflow.com/questions/31572475/spring-resttemplate-async-vs-sync-resttemplate. there is AsyncRestTemplate – Holm Feb 21 '19 at 15:02
  • Thanks for your response, I can't figure out how to use with Spring boot 2 and I think that can be a simple way – Dorin Feb 21 '19 at 15:14
  • I think using spring boot would be more convenient than using a http client and a response serializer. You could start with https://start.spring.io/ – Holm Feb 21 '19 at 15:59
  • 1
    A configure a reactive project, but I have problem when I need to aggregate calls. If you cand give me an example. Thanks – Dorin Feb 22 '19 at 06:31

0 Answers0