All Questions
Tagged with completable-future spring-boot
161 questions
0
votes
0
answers
63
views
Thread issue while sending records to kafka using completable future
@Async("kafkaTaskExecutor")
@Override
@Retryable(value = {Exception.class}, maxAttemptsExpression = "${kafka.save.failure.retry.maxAttempts}",
backoff = @Backoff(...
4
votes
2
answers
165
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 ...
2
votes
0
answers
170
views
Spring Boot 3: SecurityContextHolder returns null in CompletableFuture, works fine in Spring Boot 2
I'm migrating an application from Spring Boot 2 to Spring Boot 3, and I've encountered an issue with security context propagation in asynchronous code.
I have a REST controller method that executes ...
0
votes
0
answers
10
views
How to manage properly Thread when using Spring Boot AsyncRabbitTemplate?
I am fetching batches of 10 records from database in a do while loop until the last batch contains less than 10 records.
do {
List<CompletableFuture<Boolean>> operations = records....
0
votes
0
answers
51
views
JUnit integration test fails but Postman test passes with NullPointerException
Please ignore the excessive proliferation of logging. I'm desperate. The code below works when I run the application as a Spring Boot Applicant and use Postman to do a PUT with all of the same ...
0
votes
0
answers
46
views
WebLogic request takes too long to respond
I am maintaining a backend in Spring Boot. All requests work in a normal time, except for one process that takes too long. I tested with the Spring Boot server and a WebLogic Local server on my PC and ...
1
vote
0
answers
34
views
How to parallelly execute "delete" query maintaining trainsactionality in JPA, Spring Boot
Consider this code:
`
@Transactional
public ServiceResponse<Void> deleteFlowPlan(Context context)
{
ServiceRequest<Map<String, Object>> serviceRequest = context.get(...
-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
289
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:
...