Learn how to configure and use JmsClient along with @JmsListener in Spring 7.0 and above.
Also find me here:
Baeldung Author
Emanuel Trandafir
I'm Emanuel Trandafir, a passionate Java developer eager to explore and share insights on diverse programming paradigms, tools, and practices. I actively encourage my readers to join me in meaningful discussions, allowing us to learn from each other's perspectives. Beyond work, I love staying active through sports, hiking, and traveling, and I've recently switched from long-distance running to the thrill of rock climbing.
Here's what I've written (so far):
Baeldung on Java
- All
- Testing (10)
- Data (7)
- Architecture (7)
- Spring Boot (5)
- Reactive (5)
- Spring WebFlux (4)
- Spring Data (4)
- Persistence (4)
- Spring (3)
- Maven (3)
- Java Streams (3)
- Java Concurrency (3)
- Java (3)
- Docker (3)
- DevOps (2)
- Artificial Intelligence (2)
- Web Services (1)
- Spring Web (1)
- Spring AI (1)
- Java Dates (1)
- Java Collections (1)
- Jackson (1)
- JSON (1)
- Core Java (1)
How to Resolve NaN Values in Micrometer Gauges in Prometheus
Learn why you might get NaN as the value of a Micrometer gauge and ways to avoid this when using Prometheus
Introduction to Jlama
Filed under Artificial Intelligence
Learn how to use Jlama with a simple setup and direct examples.
Spring @Retryable With @Transactional
Filed under Spring Boot
Learn how to retry transactions with Spring via spring-retry and ways to configure the parameters of the retries.
Handling UnexpectedRollbackException in Spring
Filed under Spring Boot, Spring Data
Learn how to prevent UnexpectedRollbackException in Spring by using separate transactions or TransactionTemplate for reliable audit logging.
How to Unit Test Micrometer
Filed under Testing
Unit testing metrics is crucial for ensuring that our application correctly tracks performance data and business metrics. By using Micrometer’s SimpleMeterRegistry, we can create isolated tests that verify our metrics collection without requiring a full Spring context. When it comes to integration tests, we need to reset the MeterRegistry to perform assertions on it during our @SpringBootTests.
Tagging Patterns for Micrometer Metrics
In this article, we explore Micrometer metrics with a focus on tagging. We use Micrometer in a Spring Boot application and apply various patterns to create simple metrics, such as counters and timers.
We’ll start by using Micrometer’s Builder API to create meters with variable tag values. Additionally, we’ll look at MeterProviders as an alternative that allows us to avoid potential performance issues. We’ll also use Spring AOP and Micrometer-specific annotations to record method invocations in a declarative manner.
Implementing CQRS with Spring Modulith
Filed under Architecture, Spring
Let’s take a fresh look at the CQRS pattern, exploring its benefits and trade-offs in a modular Spring Boot application. We’ll use Spring Modulith to structure our code into clearly separated modules and to enable asynchronous, event-driven communication between them.
This approach is inspired by our colleague Gaetano Piazzolla’s article, where he demonstrates CQRS with Spring Modulith in a product catalog. Here, we’ll adapt the same ideas to a movie ticket booking system and keep the two sides in sync via domain events.
How to Fix Unknown Magic Byte Errors in Apache Kafka
Filed under Data, Spring Boot
“Unknown magic byte” error and other deserialization issues can arise when consuming Avro messages in Kafka. Spring Kafka’s ErrorHandlingDeserializer and publishing to a DLQ topic can help manage poison pill messages like these, ensuring the consumer continues processing without getting stuck.
Baeldung on Kotlin
- All
- Testing (1)
- Kotlin Strings (1)
- Kotlin Numbers (1)
- Kotlin Basics (1)
- Kotlin Arrays (1)
A Guide to Property-Based Testing in Kotlin
Filed under Testing
Learn about property-based testing in Kotlin.
Convert an Array to a String
Filed under Kotlin Arrays, Kotlin Strings
Learn how to convert an Array’s content to a String in Kotlin.
The ..< Operator for Open-ended Ranges in Kotlin
Filed under Kotlin Basics
Learn about the new Kotlin operator
Converting an Int? to an Int in Kotlin
Filed under Kotlin Numbers
Learn how to extract a value of a nullable variable.
Baeldung on SQL
- All
- Database Concepts (1)
Multiple Indexes vs. Multi-Column Indexes
Filed under Database Concepts
Explore database indexes, focusing on the differences between individual and composite indexes.