Introduction In this tutorial I am going to show you how to call Spring REST APIs concurrently using Java CompletableFuture. So basically REST service APIs will be invoked parallelly and in parallel execution the response time will be very less. I am going to show you how to call REST APIs concurrently using Java 8…

Posted in Microservices Spring Boot Spring REST

How To Call Spring REST APIs Concurrently using Java CompletableFuture

I am going to discuss here CompletableFuture vs Parallel Stream in Java programming language. CompletableFuture extends Future with added advantage to allow the tasks finish in an ad hoc manner. In Parallel Stream task is divided into sub-tasks and run on separate threads to be completed faster. Both CompletableFuture and Parallel Stream were added in…

Posted in Java

Difference Between Parallel Stream and CompletableFuture in Java

Introduction Here I will discuss about Java 8 or later version’s new feature CompletableFuture in Java programming language. Using Java 8 or later version’s CompletableFuture API you can complete the tasks in an ad hoc manner. A Future represents the pending result of an asynchronous computation. It offers a method — get() — that returns…

Posted in Java

CompletableFuture in Java 8 or later