Skip to main content

All Questions

Tagged with
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); // ...
logbasex's user avatar
  • 2,350
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,...
Harkonnen's user avatar
  • 813
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 ...
mephisto_mori's user avatar
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(...
dehoazh's user avatar
  • 11
-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 ...
Kartik Kodag's user avatar
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 (...
user1555543's user avatar
-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 ...
Arch's user avatar
  • 1
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 (...
Mihhail Sokolov's user avatar
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 ...
Shrey Mishra's user avatar
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("/...
osumatu's user avatar
  • 442
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/ (...
Adam Lee's user avatar
  • 586
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 '...
ProgSnt6's user avatar
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(...
Florian's user avatar
  • 197
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 ...
kalidali's user avatar
  • 286
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") ...
Davy Jones's user avatar

15 30 50 per page
1
2 3 4 5 6