20 Jun 2025
DZone Java Zone
How to Marry MDC With Spring Integration
In modern enterprise applications, effective logging and traceability are critical for debugging and monitoring business processes. Mapped Diagnostic Context (MDC) provides a mechanism to enrich logging statements with contextual information, making it easier to trace requests across different components.
This article explores the challenges of MDC propagation in Spring integration and presents strategies to ensure that the diagnostic context remains intact as messages traverse these channels.
Let's start with a very brief overview of both technologies. If you are already familiar with them, you can go straight to the 'Marry Spring Integration with MDC' section.
20 Jun 2025 11:00am GMT
18 Jun 2025
DZone Java Zone
Top Trends for Data Streaming With Apache Kafka and Flink
The evolution of data streaming has transformed modern business infrastructure, establishing real-time data processing as a critical asset across industries. At the forefront of this transformation, Apache Kafka and Apache Flink stand out as leading open-source frameworks that serve as the foundation for cloud services, enabling organizations to unlock the potential of real-time data. Over recent years, trends have shifted from batch-based data processing to real-time analytics, scalable cloud-native architectures, and improved data governance powered by these technologies. Looking ahead, the data streaming ecosystem is set to undergo even greater changes. Here are the top trends shaping the future of data streaming for businesses.
The Top Data Streaming Trends
I recently explored the past, present, and future of data streaming tools and strategies from the past decades. Data streaming is becoming more and more mature and standardized, but also innovative.
18 Jun 2025 8:00pm GMT
17 Jun 2025
DZone Java Zone
Effective Exception Handling in Java and Spring Boot Applications
When you're building Java applications, especially with frameworks like Spring Boot, it's easy to overlook proper exception handling. However, poorly managed exceptions can make your application harder to debug, more difficult to maintain, and a nightmare for anyone dealing with production issues.
In this post, we'll explore how to handle exceptions effectively by avoiding generic catch
blocks, using custom exceptions, and centralizing exception handling with Spring Boot's @ControllerAdvice
.
17 Jun 2025 8:00pm GMT
Kung Fu Commands: Shifu Teaches Po the Command Pattern with Java Functional Interfaces
Po was supposed to be practicing the Dragon Scrolls. Instead, he was… well, eating.
Shifu (arms crossed): "Po! Again? Training time, not dumpling time."
17 Jun 2025 2:00pm GMT
Driving Streaming Intelligence On-Premises: Real-Time ML With Apache Kafka and Flink
Lately, companies, in their efforts to engage in real-time decision-making by exploiting big data, have been inclined to find a suitable architecture for this data as quickly as possible. With many companies, including SaaS users, choosing to deploy their own infrastructures entirely on their own, the combination of Apache Flink and Kafka offers low-latency data pipelines that are built for complete reliability.
Particularly due to the financial and technical constraints it brings, small and medium-sized enterprises often have a number of challenges to overcome when using cloud service providers. One major issue is the complexity of cloud pricing models, which can lead to unexpected costs and budget overruns. This article explores how to design, build, and deploy a predictive machine learning (ML) model using Flink and Kafka in an on-premises environment to power real-time analytics.
17 Jun 2025 11:00am GMT
16 Jun 2025
DZone Java Zone
How to Use Testcontainers With ScyllaDB
Setting up a full database environment for every round of integration testing can be time-consuming and complex. This post walks through how to use the Testcontainers library to spin up lightweight, throwaway ScyllaDB instances for testing purposes. We'll explore a practical example that covers initializing the database and running tests against it.
Testcontainers: A Tool for Integration Testing
You automatically unit test your code and (hopefully) integration test your system…but what about your database? To ensure that the application works as expected, you need to extend beyond unit testing. You also need to automatically test how the units interact with one another and how they interact with external services and systems (message brokers, data stores, and so on). But running those integration tests requires the infrastructure to be configured correctly, with all the components set to the proper state. You also need to confirm that the tests are isolated and don't produce any side effects or "test pollution." How do you reduce the pain…and get it all running in your CI/CD process?
16 Jun 2025 5:00pm GMT
Code of Shadows: Master Shifu and Po Use Functional Java to Solve the Decorator Pattern Mystery
It was a cold, misty morning at the Jade Palace. The silence was broken not by combat… but by a mysterious glitch in the logs.
Po (rushing in): "Shifu! The logs… they're missing timestamps!"
16 Jun 2025 12:00pm GMT
13 Jun 2025
DZone Java Zone
Memory Leak Due to Uncleared ThreadLocal Variables
In Java, we commonly use static, instance (member), and local variables. Occasionally, we use ThreadLocal variables. When a variable is declared as ThreadLocal, it will only be visible to that particular thread. ThreadLocal variables are extensively used in frameworks such as Log4J and Hibernate. If these ThreadLocal variables aren't removed after their use, they will accumulate in memory and have the potential to trigger an OutOfMemoryError.
In this post, let's learn how to troubleshoot memory leaks that are caused by ThreadLocal variables.
13 Jun 2025 12:00pm GMT
12 Jun 2025
DZone Java Zone
Beyond Java Streams: Exploring Alternative Functional Programming Approaches in Java
Few concepts in Java software development have changed how we approach writing code in Java than Java Streams. They provide a clean, declarative way to process collections and have thus become a staple in modern Java applications. However, for all their power, Streams present their own challenges, especially where flexibility, composability, and performance optimization are priorities.
What if your programming needs more expressive functional paradigms? What if you are looking for laziness and safety beyond what Streams provide and want to explore functional composition at a lower level? In this article, we will be exploring other functional programming techniques you can use in Java that do not involve using the Streams API.
12 Jun 2025 2:00pm GMT
11 Jun 2025
DZone Java Zone
Java Enterprise Matters: Why It All Comes Back to Jakarta EE
Enterprise Java has been a foundation for mission-critical applications for decades. From financial systems to telecom platforms, Java offers the portability, stability, and robustness needed at scale. Yet as software architecture shifts toward microservices, containers, and cloud-native paradigms, the question naturally arises: is Jakarta EE still relevant?
For modern Java developers, the answer is a resounding yes. Jakarta EE provides a standardized, vendor-neutral set of APIs for building enterprise applications, and its evolution under the Eclipse Foundation has been a case study in open innovation. It bridges traditional enterprise reliability with the flexibility needed for today's distributed systems, making it an essential tool for developers who want to build scalable, secure, and cloud-ready applications.
11 Jun 2025 7:00pm GMT
09 Jun 2025
DZone Java Zone
Kung Fu Code: Master Shifu Teaches Strategy Pattern to Po – The Functional Way
"There is no good or bad code. But how you write it… that makes all the difference." - Master Shifu
The sun had just touched the tips of the Valley of Peace. Birds chirped, the wind whispered tales of warriors, and Po-the Dragon Warrior-was busy trying to write some Java code. Yes, you read that right.
09 Jun 2025 1:00pm GMT
06 Jun 2025
DZone Java Zone
How to Create a Custom React Component in Vaadin Flow
Vaadin Flow is a Java-based, backend-driven UI framework that is best suited for admin UIs, where the number of active users is predictable and bounded. Within this controlled context, the UI state can be managed on the backend, sharing only the necessary diffs with the user for rendering.
From a developer's perspective, all UI configuration remains in Java code. There is no need to manually create separate REST endpoints, as the UI component state is managed directly within Java.
06 Jun 2025 8:00pm GMT
How to Identify the Underlying Causes of Connection Timeout Errors for MongoDB With Java
Java developers and MongoDB are like Aladdin and the Genie from Arabian Nights. Developers rub the lamp with their wildest NoSQL wishes, and MongoDB swoops in, granting Spring Boot microservices and REST APIs the magic they need to soar. But every so often, a Jafar-like menace swoops in, forcing our Aladdin (Java devs) to wrestle with sleepless nights. One such villainous foe is the connection timeout, locking APIs in a cave of wonders with no escape, leaving developers yearning for a magic carpet fix.
So, what's a connection timeout error? Imagine Aladdin, the developer, sending Abu, his trusty monkey, to fetch a shiny treasure-data-from MongoDB's palace vault. Abu's got 30 seconds to scamper over and back. But if the palace is packed with guards (server overload), the gates are jammed shut (network issues), or Abu's running to the wrong hideout (bad address), and he doesn't make it in time. That's a timeout: MongoClient can't grab the data, the mission fails, and your app's stuck with a MongoTimeoutException, leaving your API as empty-handed as Aladdin without his loot. In simple terms, it's when your MongoClient-the trusty bridge between your Java app and MongoDB-can't reach the server before the clock runs out.
06 Jun 2025 2:00pm GMT
04 Jun 2025
DZone Java Zone
Supercharge Your Java Apps With AI: A Practical Tutorial
Artificial intelligence (AI) offers great potential for software applications by providing options like natural language processing, image recognition, and predictive analysis, which can be integrated within software.
This tutorial aims to empower developers to unlock advanced functionalities by providing a blend of theoretical insights and practical, code-centric examples, allowing for seamless integration of AI in their Java applications.
04 Jun 2025 1:00pm GMT
03 Jun 2025
DZone Java Zone
Beyond Bytecode: Exploring the Relationship Between JVM, JIT, and Performance
In computing, the execution of programs written in high-level languages requires that the source code be compiled to a low-level or native language. This compilation is referred to as Ahead-of-Time (AOT) and is typically done during build time. Effectively reducing the work to be done during runtime.
In case of Java, the AOT produces an intermediate binary, viz. bytecode, which is then translated to native machine code during execution by the Java Virtual Machine (JVM). This is in line with Java's philosophy of Write-Once-Run-Anywhere (WORA), or simply put, platform independence.
03 Jun 2025 2:00pm GMT
29 May 2025
DZone Java Zone
Monoliths, REST, and Spring Boot Sidecars: A Real Modernization Playbook
Forget the idea that modernization has to mean rewriting everything. The real work happens in the in-between, where REST meets SOAP, where sidecars live beside WAR files, and where code changes are political before they're technical.
Especially in high-stakes, compliance-bound environments like healthcare, government, and labor systems, modernization doesn't look like a revolution. It looks like a careful negotiation.
29 May 2025 5:00pm GMT