Skip to content

Commit

Permalink
Separate executors
Browse files Browse the repository at this point in the history
  • Loading branch information
kevink-sq committed Sep 27, 2024
1 parent 89918ca commit 95463bf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/com/amplitude/HttpTransport.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ class HttpTransport {

// Managed by setters
private ExecutorService retryThreadPool = Executors.newFixedThreadPool(10);
private ExecutorService sendThreadPool = Executors.newFixedThreadPool(40);
private ExecutorService sendThreadPool = Executors.newFixedThreadPool(20);
private ExecutorService supplyAsyncPool = Executors.newCachedThreadPool();

HttpTransport(
HttpCall httpCall, AmplitudeCallbacks callbacks, AmplitudeLog logger, long flushTimeout) {
Expand Down Expand Up @@ -126,7 +127,7 @@ private CompletableFuture<Response> sendEvents(List<Event> events) {
throw new CompletionException(e);
}
return response;
}, sendThreadPool);
}, supplyAsyncPool);
}

// Call this function if event not in current Retry list.
Expand Down

0 comments on commit 95463bf

Please sign in to comment.