I need to make multiple RestTemplate calls for each of the Id in a List<Ids>. What is the best way to perform this?
I have used parallelStream(). Below code snippet is a similar scenario.
List<Integers> employeeIds;
employeeIds.parallelStream().
.map(empId -> employeeService.fetchEmployeedetails(empId))
.collect(Collectos.toList());
employeeService.fetchEmployeedetails is a kind of restCall which will fetch all the employeeDetails.
Is there any other way to tune the performance?