All Questions
88 questions
1
vote
2
answers
175
views
Rest API: return CompletableFuture in Controller does not make API run asyc
/**
* Async work.
*/
@GetMapping(value = "/async/data/v4")
public void getDataAsyncV4() {
CompletableFuture.supplyAsync(() -> {
try {
Thread.sleep(1000); // ...
1
vote
1
answer
902
views
Java Reactor API: how to wait for an object to be modified by asynchronous calls to be completely modified before sending it back to the caller?
I'm totally new to the Java Reactor API.
I use a WebClient to retrieve data from an external webservice, which I then map to a DTO of class "LearnDetailDTO".
But before sending back this DTO,...
1
vote
3
answers
2k
views
Java: How can I queue up asynchronous calls to be executed when a certain condition is met?
TL;DR: I want to perform an asynchronous Call to a REST-API. The standard call would give me a CompleteableFuture<Response>, however because the API has a limit on how many calls it allows in a ...
1
vote
0
answers
73
views
Spring boot call async while others in progress
I have a requirement where I am validating a data hitting a rest call like
@Async
private void validate() throws WebClientResponseException {
this.webClient.method(HttpMethod.GET)
.uri(...
-1
votes
2
answers
794
views
How to make REST call asynchronous in Java
I have REST calls between two microservices, one of the call is taking more than 15 mins of time to complete. We have company's own private cloud implementation which is terminating any open ...
0
votes
0
answers
238
views
Multithreading in JAXRS server side implementation
I have a web service that is taking a long time to process a request. The majority of the time is spent while converting the SQL ResultSet to java objects. I am planning to move the heavy work (...
-1
votes
1
answer
21
views
Running methods Aysnchronously in Rest API in Springboot
How should I decide which REST methods to be annotated with @Async and why we require some methods to be annotated @Async ?
For example
@RestController
public class controller {
private ...
1
vote
2
answers
560
views
How to make endpoints initialization asynchronous in Spring Boot?
In my Spring Boot project, a couple of REST API endpoints require a class whose initialization takes several minutes. Because of this, it takes several minutes to start the REST API.
Is it possible (...
0
votes
0
answers
78
views
Asynchronous REST call Server Side
I want to make an asynchronous REST call for my service. It's like client called my service, I send client acknowledgement that I received it and processing, and in back-end I am processing the ...
0
votes
0
answers
127
views
Asynchronous Worker in Spring Rest
I am creating a Sprint Rest API to collect multiple requests and call yet another API. What I did so far is:
final String BASE_URL = "http://localhost:9001/";
@RequestMapping("/...
0
votes
2
answers
50
views
REST API Call works on Java but not on Android (FileNotFound)
In my Android application, I am making an asynchronous call to a database to fetch sports feeds (following the API documentation in this link: https://www.mysportsfeeds.com/data-feeds/api-docs/ (...
0
votes
0
answers
942
views
Spring Boot: check database until get a specific value and do return response to the client
Good afternoon,
I have a question, if in my Spring Boot application a client makes a request, I make an insert of an entity in the database and then I wait for a field of the entity to have the value '...
1
vote
4
answers
13k
views
How to call rest api and do not wait any response
I have this code
private Boolean doSomething() {
// SOME CODE
this.sync();
return true;
}
public void sync() {
RestTemplate restTemplate = restTemplate();
restTemplate.exchange(...
0
votes
1
answer
2k
views
Spring REST Service - Asynchronous Requests without Timeout
I created an asynchronous Spring REST service by calling an `@Async` method and returning a `CompletableFuture` as the response in my `@RestController`.
Is there any way to disable the timeout for ...
0
votes
0
answers
591
views
How do I not lose my RequestAttributes on new thread?
Using Spring 4, in a simple POST API, I am attempting to immediately return a response and continue some more processing in the background.
@RestController
@RequestMapping("/somewhere")
...