Reputation: 1052
I'm working on implementing concurrent third-party API calls for items in a list using CompletableFuture in Java. Instead of processing these requests sequentially, I want them to be executed asynchronously without waiting for each other.
We plan to use CompletableFuture, but I believe we'll need to manage the thread pool carefully. Without setting parameters like max pool size, the application might consume excessive memory and potentially freeze during high traffic.
My main concerns are:
I'm specifically looking for:
Can anyone provide guidance on these aspects of concurrent API call implementation using CompletableFuture?
Upvotes: 1
Views: 61