I found out that the response to the request lasts 3-5 seconds and 1.5k request per hours, so it's not good situation.
Endpoint - just get entity from database
@GetMapping
@Async("operationThreadExecutor")
public CompletableFuture<OperationDto> read()
I have next config
@Bean
public AsyncTaskExecutor operationThreadExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(5);
executor.setMaxPoolSize(10);
executor.setQueueCapacity(50);
executor.setThreadNamePrefix("OperationSelfExecutor-");
executor.initialize();
How to add metrics in grafana for current connection by this endpoint and queue?
Thanks in advance.