Hello there!! Recently Google introduced open sourced plugin called Jib. A plugin helps easily build and push Java Docker images to a repo. It does not require you to write a Dockerfile or have docker installed. Plugin available for Maven and Gradle.
Continue reading “Google Jib”
Draining Apache Kafka topic
Deleting Kafka topic can be a painful task, as of now the only way to do it, is to ssh into one of the Kafka brokers and execute CLI command. Like this:
Continue reading “Draining Apache Kafka topic”
Spring Cloud Stream + Apache Kafka(PollableMessageSource)
Hi there! Recently Spring Cloud Stream 2.0 introduced a new feature – polled consumers(PollableMessageSource), where the application can control the reading rate from a source (Kafka, RabbitMQ), basically you can pause your stream. It is especially helpful in the case of Kafka. Before the new feature, you will just read continuously payload from the topic as much as it has, non-stop. What if you need to pause your stream? Say we are getting messages from Kafka topic and then we are sending data to some external service and at some point, external service becomes unavailable.
For this use case, I created an application, that deals with such an issue.
Continue reading “Spring Cloud Stream + Apache Kafka(PollableMessageSource)”
Spring Cloud Microservices(Quick guide)
Purpose of this post is to give a reader a quick info about different components of Spring Cloud Microservices and how they work together.
Continue reading “Spring Cloud Microservices(Quick guide)”
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.”