Guide to Setting Up Apache Kafka Using Docker
1. Overview Docker is one of the most popular container engines used in the software industry to create, package, and deploy applications. In this tutorial, we'll learn how to do an Apache Kafka setup...
View ArticleUsing Watch with the Kubernetes API
1. Introduction In this tutorial, we'll continue to explore the Java Kubernetes API. This time, we'll show how to use Watches to efficiently monitor cluster events. 2. What are Kubernetes Watches? In...
View ArticleSplit Java String by Newline
1. Overview In this tutorial, we'll look at different ways to split a Java String by newline characters. Since the newline character is different in various operating systems, we'll look at the method...
View ArticleLong Polling in Spring MVC
1. Overview Long polling is a method that server applications use to hold a client connection until information becomes available. This is often used when a server must call a downstream service to get...
View ArticleMulti-Entity Aggregates in Axon
1. Overview In this article, we'll be looking into how Axon supports Aggregates with multiple entities. We consider this article to be an expansion of our main guide on Axon. As such, we'll utilize...
View ArticleHow to Handle InterruptedException in Java
1. Introduction In this tutorial, we'll explore Java's InterruptedException. First, we'll quickly go through the life cycle of a thread with an illustration. Next, we'll see how working in...
View ArticleJava Weekly, Issue 382
1. Spring and Java >> What's new in Spring Data 2021.0? [spring.io] JFR metrics, R2DBC by example, more type-safe queries for Kotlin, and supporting jMolecules – all in a new Spring Data version!...
View ArticleSet a Timeout in Spring 5 Webflux WebClient
1. Overview Spring 5 added a completely new framework – Spring WebFlux, which supports reactive programming in our web applications. To perform HTTP requests, we can use the WebClient interface, which...
View ArticleAdvise Methods on Annotated Classes With AspectJ
1. Overview In this tutorial, we'll use AspectJ to write trace logging output when calling methods of configured classes. By using an AOP advice to write trace logging output, we encapsulate the logic...
View ArticleUsing Cucumber Tags with JUnit 5
1. Overview In this tutorial, we'll illustrate how we can use Cucumber tag expressions to manipulate the execution of tests and their relevant setups. We're going to look at how we can separate our API...
View ArticleConvert an Array of Primitives to an Array of Objects
1. Introduction In this short tutorial, we'll show how to convert an array of primitives to an array of objects, and vice versa. 2. Problem Let's say we have an array of primitives, such as int[], and...
View ArticleJVM Storage for Static Members
1. Overview In our day-to-day work, we often don't care about JVM's internal memory allocation. However, knowing the basics of the JVM memory model comes in handy for performance optimization and...
View ArticleIntroduction to Debezium
1. Introduction Today's applications sometimes need a replica database, a search index to perform a search operation, a cache store to speed up data read, and a data warehouse for complex analytics on...
View ArticleCRUD Application With React and Spring Boot
1. Introduction In this tutorial, we'll look at creating an application capable of creating, updating, retrieving, and deleting (CRUD) client data. The application will consist of a simple Spring Boot...
View ArticleWhat are Compile-time Constants in Java?
1. Overview The Java language specification does not define or even use the term compile-time constants. However, developers often use this term for describing a value that is not changed after...
View ArticleJava Weekly, Issue 383
1. Spring and Java >> The Anatomy of ct.sym — How javac Ensures Backwards Compatibility [morling.dev] In pursuit of backward compatibility – how the release flag and ct.sym file helps us to...
View ArticleGuide to Retry in Spring WebFlux
1. Overview When we're building applications in a distributed cloud environment, we need to design for failure. This often involves retries. Spring WebFlux offers us a few tools for retrying failed...
View ArticleConcatenate Two Arrays in Java
1. Overview In this tutorial, we're going to discuss how to concatenate two arrays in Java. First, we'll implement our own methods with the standard Java API. Then, we'll have a look at how to solve...
View ArticleHow to Deal With Databases in Docker?
1. Overview In this article, we'll review how to work with Docker to manage databases. In the first chapter, we'll cover the installation of a database on our local machine. Then we'll discover how...
View ArticleConverting a Java Keystore Into PEM Format
1. Introduction A Java KeyStore is a container of security certificates that we can use when writing Java code. Java KeyStores hold one or more certificates with their matching private keys and are...
View Article