Kafka Test Suite (Java)

One of the common issues that I had with Kafka was an integration test(Java). I was searching on the web for a library which will include not only Kafka broker but also Confluent Schema Registry. I didn’t find one, so I went to kafka-streams-examples and extracted classes needed for running Kafka cluster programmatically.
Continue reading “Kafka Test Suite (Java)”

Spring’s WebClient testing + findings from Async/RestTemplate.

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.”

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”