All Questions
104 questions
4
votes
2
answers
166
views
thenCompose hangs/timeout web graphql application
I have SpringBoot 3, graph ql web app. My goal is to resolve one field which depends on several dataloaders. The problem is that when I combine them using thenCompose my application just hangs for ...
-1
votes
1
answer
38
views
AWS sdk 2 does not return from ".join()" that is called on the completable future on PutObject when uploading large files
We upgraded from version 1 to the version 2 sdk because support was cut for the first version of the SDK.
The old client sync client was switched out for the new async client and new transfer manager. ...
1
vote
0
answers
111
views
java.util.concurrent.CompletionException: org.springframework.beans.factory.support.ScopeNotActiveException
Trying to execute below piece of code but getting an error as stated follows. Any suggestions to fix this? Source code
CompletableFuture[] futures = stringList.stream().map(stringListRef -> ...
1
vote
1
answer
42
views
CompletableFuture not using defined TaskExecutor. Using commonPool instead
I'm trying execute some async work using CompletableFuture with a custom Executor. However, I see from the logs that it's using the default commonPool. What am I missing here?
@Async("...
0
votes
0
answers
46
views
Completable Future with Executor for handling Exceptions only
There is a list of objects List<Foo> fooDetails, which I will use to create Bar request corresponding to each element of fooDetails from database and then do a rest template call.
public void ...
-1
votes
1
answer
124
views
What happens to running thread when CompletableFuture throws TimeoutException
I have a spring boot application and i am sending multiple request in async manner.
Here is the TaskExecutor configuration:
@Bean(name = "someWorkExecutor")
public TaskExecutor ...
0
votes
0
answers
160
views
Why CompletableFuture don't call API in Spring boot?
I'm making multiple API calls at the same time with CompletableFuture to reduce user waiting time.
Here is my code:
@Async
public CompletableFuture<CommonDataDTO> commonData() throws ...
0
votes
0
answers
61
views
Create New thread for sub task using completablefuture
I have a problem,
On Service class i have a @async method which call three method using CF,
Service 1 Method 1 t1
Service 2 Method 2 t2
Service 3 Method 3 t3
In method 1 I have complex logic around ...
0
votes
1
answer
290
views
CompletableFuture not working as expected and having more number of extra threads
I'm trying to parallelize the below operation of fetching all the records with 50000 records in each iteration with pagination and writing them into a CSV file on an s3 file.
Before Parallelism:
...
0
votes
1
answer
716
views
CompletableFuture Transaction rollback
Given this pieace of code:
@Async
@Transactional
public CompletableFuture<Optional<Bundle>> newBundle(String name){
return CompletableFuture.supplyAsync(() -> {
Bundle newBundle = ...
2
votes
1
answer
357
views
Parent Span is getting ended after propagating to a completable future
I have a Service class that is calling a DAO method from a CompletableFuture.supplyAsync() method with a Context-wrapped Executor service. Here the propagation is working fine and can see the same ...
-1
votes
1
answer
112
views
CompletableFuture does not wait for end previous function in Spring Boot
I have a problem with CompletableFuture. I'm trying to create a modbus (half-duplex) communication module in Spring Boot.
I have a function startPooling that requestForState every 10s to get a current ...
1
vote
1
answer
991
views
How to handle if CompletableFuture might be null on occasions
I have these CompletableFutures:
CompletableFuture<Info> futureA =
createFutureA(multipleItems, startDate, source, context);
CompletableFuture<PPPInfo> futureB =
createFutureB(...
0
votes
1
answer
435
views
@async not working as expected in spring boot
I am trying to make parallel rest calls.
I have setup the executor like this in the class itself.
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(5);
...
0
votes
1
answer
72
views
What's wrong with my function for making async calls to an endpoint and collecting responses?
I have a use-case where I need to hit an endpoint to fetch some data. The endpoint takes start-date-time and end-date-time as params and has a limitation that the duration between them can only be <...