Lately, we have been seeing in those posts how to perform some monitoring tasks. Today we will see the Java Agents, what they are and how they work. Which can also help us to perform monitoring tasks, among other things. Something that we will try to explain in this post, first with some theory and then with the help of examples.

What are Java Agents?, they are basically Java libraries that include classes that implement the Java Instrumentation API. Which is available since JDK 1.5. This is a very simple API but at the same time, very powerful. …

Today we are going to see something very simple, and it is basically how to make JUnit and Mockito work on Eclipse. It is not a great post that brings us or clarifies the specific operation of a technology. But it is a helpful post that can be useful to have at hand to quickly configure our project, especially if we do not have a good memory.

Eclipse is one of the most famous development tools and my favorite, at least when we develop Java applications. It makes the work much easier and in the case of tests, it allows…

In this post, we are going to see the operation of ELK oriented to the log management in a Java application, and for this, we will use the application with Apache Camel that we have seen other times.

ELK is how it is known to a set of applications, specifically to: Elasticsearch, Logstash, and Kibana. All of them are open-source tools developed by Elastics. They allow you to collect data from any type of source and in any format to search, analyze and visualize the data in real-time.

  • Logstash is a server-side data processing pipeline that consumes data from a…

Today we are going to see a simple tip about Docker and its logs. But it can cause us more than one headache, and that is the treatment of the container logs and their size.

By default, Docker has several ways to display information about your containers. And by default, it selects the option to store this information in JSON file format. We can visualize this through the following command:

docker info --format '{{.LoggingDriver}}'

The main problem with this is that Docker stores information in an uncontrolled way. That is to say, if we do not configure it, it will…

We were already talking in a previous post about WSO2 and the cache mediator, you can see it here. Today we will see an alternative but similar solution. In this case, we will use Redis, which will allow us to cache the response of a backend.

Redis is a fast and open-source in-memory key-value data structure store. Basically a key-value NoSQL database, very popular among developers. It allows the use of different data types: List, Sets, Hashes, etc.

We will be based only on the key-value pairs, the hashes. And we will see their use through an example, as always…

Today we will return to post about WSO2 and its mediators. We will see how the Cache Mediator works, which can be very useful although it is not very well known.

The idea is simple, through this mediator, WSO2 will cache the response of a given backend based on the request we are going to make. How does it do it? It obtains a hash value associated with the message stored in the flow. If it exists it will execute the sequence configured in the onCacheHit parameter, which is optional. It obtains the response stored in the cache and sends…

It recently happened to me that I had to make SOAP calls through an Axis2-based client and use a particular certificate of trust. The problem came from the way the certificate of trust was indicated and how we were invoking our program.

The first solution was the widely known solution of setting up such a certificate in the system. In the following way:

System.setProperty("", trustStorePath);
System.setProperty("", trstStorePass);
System.setProperty("", trustStoreType);

This solution works well on its own. The problem in our case was when we launched the execution through Maven. And this is because Maven makes its own calls to certain…

We have already seen enough of Apache Camel, and today we will see how to make Service Discovery through the Spring Cloud Netflix library. But first, as always, we will look at various concepts to better understand the example.

We must place ourselves in an environment of creation and use of Microservices. And understand that they are deployed through containers in the cloud mainly. So, their network locations (IPs and addresses) can be dynamic. And therefore it can happen that the configuration we have over their location not always is valid.

Hence the need for Service Discovery, or what is…

Today we are going to see a very complete post about Apache Camel and Micrometer, and how we can present different metrics in Prometheus and Grafana. But in which we will not be able to do anything if not for the use of Spring Actuator. Before starting to indicate how we can achieve this, we are going to give a small introduction to each of the components to get an idea of what they are and what they are for.

Spring Actuator is another module of Spring Boot that enables the creation of endpoints associated with the application that will…

Caffeine Structure

We are going to see how to improve the performance of our web services in Apache Camel. To do this we will use Caffeine Cache, a simple but powerful memory cache made in Java and based on Guava’s cache.

The idea behind the use of the cache will be to be able to store the result of expensive operations in memory. In this way, in successive calls, we will be able to access this result in a fast and agile way of avoiding the expensive operation.

Let’s start as always by indicating which are the libraries to be included. On…

Daniel S. Blanco

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store