Several weeks ago I was working on a task where I have to do millions of REST HTTP calls from java app to external service. First I tried to use Spring’s RestTemplate, but it was too slow for my case because it’s synchronous(lets say server response rate 30ms and I have to make 2M requests, which leads us to approx 16 hours, in single thread mode). Then I started looking for something asynchronous and luckily Spring has AsyncRestTemplate. It has similar functionality as RestTemplate, but only difference is that it returns ListenableFuture.
Continue reading “Spring’s WebClient testing + findings from Async/RestTemplate.”
Tag: Spring
Spring Boot + Apache Spark + Apache Kafka
In this post, I will explain how you can solve an issue with serialization/deserialization of Spring beans and Kafka in Spark application.
As an example, I found a similar question on StackOverflow.
Continue reading “Spring Boot + Apache Spark + Apache Kafka”