Apache Kafka is an event streaming platform that is used to collect, process, store, integrate data at scale.
Kafka is a distributed system consisting of servers and clients that communicate via a high-performance TCP network protocol.
In this tutorial, we will cover Spring support for Kafka. Spring ecosystem brings Spring Kafka which is a very simple and typical template programming model with a KafkaTemplate message driven POJO via @KafkaListener annotation.
Complete source code for this article can be found on GitHub.
To install and do the Kafka setup on Windows OS, refer to GitHub.
Wait, boss !!! What is an…
Suppose you have multiple microservices applications and you want to manage& monitor that such as if a service goes down, an email should trigger or you will get the notification on Slack, Hipchat, or any other. You want to monitor the application health status as well. SBA(Spring Boot Admin server) is the central point where we can achieve it.
The article shows how to set up and use the Spring Boot Admin Server. The sample code of the guide can be found over on GitHub.
Spring Boot Admin server is a web application that is used to manage and monitor…
Sometimes we need to create a web application that can connect to multiple databases. We might need to connect multiple databases based on the client, customers so on.
Spring provides AbstractRoutingDataSource class which we can extend and achieve the data source routing dynamically and we can do it easily on Spring Boot.
Sometimes for security reasons, performance, scalability, or isolation, we need data source routing such as MASTER and REPLICA DB where REPLICA DB can only be read-only.
Another use case is the real-time processing data of satellites. …
Hello all ! Can you guess what will be the output of the following code snippet in Java?
OK !!! You might have the following answers :
Compile time error (var is not a type)OR
o/p = 30
For me , it is
successwith a valid output as
30. Suddenly you might be thinking “am i crazy !!!”.
Yes I am a crazy developer. In the above code snippet, there is no error if you are using Java-10. (Even if you have Java-8 , you can also achieve this ; Read completely, you will figure it out.)
If you are a java developer and if anyone asks to you to create an enterprise application, suddenly your head will move left & right around the JAVA orbit and Spring/Spring Boot framework will hit your brain. Of course others might be, but it is often. Am i right ?
Spring Boot ecosystem is an evolution of Spring framework which helps to create stand-alone, production-grade Spring based applications with minimal effort.
In a festival time, my manager asked me to implement the following use case .
How many of you are aware about CyclicBarrier ? Almost all Java developers. Am i right ? When my boss asked me the same, i was thinking is it related to any cycle path of national highway. Oh, later on i found that it is a concept if Java Concurrency.In this article, we will dig it more.
Cyclic Barrier is a synchronization aid(Synchronizers) that allows a set of threads to all wait for each other to reach a common barrier point.
CyclicBarriers are useful in programs involving a fixed…
Money plays an important factor in life and a Software engineer has to deal with money calculations like monetary arithmetic a lot during software development. If it is an e-commerce or banking application, then most of the calculations are on money only. But sometimes 0.01 value also makes the whole monetary arithmetic wrong. That time we trigger our mind button and keeps on debugging, calculations manually bla bla bla !!! But in the end, we sometimes weren’t able to find the solutions; but actually, the solutions are dancing in-front, but we are not able to catch it.