My first 2 months at Tetrate

After two months working at Tetrate, I wanted to share my experiences, my challenges.

It’s been a hard but exciting change, coming from several years working with Java (even being Java Champion since 2020), in big companies, I moved to a smaller company, startup, using Go lang.

The tech stack I’ve been working on has been Go lang, Service Mesh, GCP, Kind …. and to my whole move we need to add that I’ve been using Linux for the last 4 years and now again going back to Mac OS.

I was nervous to do this change, moving from a Big company ( Red Hat ) to a small/medium one ( Tetrate), a startup, working as a contractor as it’s a USA company without legal entity in Spain.
But , before saying YES, I spent one whole day , physically, with my future potential colleagues, being able to see how do they work, the dynamics, the independence, and the complicity between them… And I have to say this definitely pleased me a lot. This is an awesome, fun, skilled, and warm team of people, that helped me, shared their thoughts with me, even when I was not one of them.

One of the challenges for me to work as a full remote developer, for the last 4 years , has been losing complete physical contact with colleagues and being “lost in translation” several times. You can express ideas, thoughts in a foreign language, but to share feelings, full of cultural context, in a remote environment, definitely you need an amazing level on that language and the particular context of each person.

I am not that proficient. I can have conversations in English, but having team conversations in my natural language ( Catalan ) , being able to make local jokes, and forecasting with high accuracy the reaction of my colleagues has been amazing. Specially on the first months.

Another point that I value a lot being part of this team at Tetrate, is that we can have regular face2face meetings monthly based, with social activities ( lunch, beers, dinner, etc ), and that if I think I need it for a better understanding I can meet with my colleague Ignasi very easy… he is amazingly responsive and helpful.

Regarding the technology, I have to say that moving to Go lang has had several mind-fighting moments, where I would exchange my realm for a DI framework, or having inheritance or polymorphism. But with the help of my colleagues specially Marc, Sergi , Gonzalo and Ignasi I came to understand the “Go way” … it’s a matter of getting used to this new approach.

Definitely using a good IDE helps on the use of Go lang, but also using the mandatory lint has helped a lot in order to have “good” code or at least a more readable one.

In my current team we are working with exciting features, involving concurrency, kubernetes , webhooks, Istio , and there’s not a single day I don’t finish my business day knowing that I have learnt a lot of things…. even clean code, patterns that I feel with Go are more enforced ( also I have colleagues that are adding this value to the code and I love it ).

One of the interesting parts of working in a Startup is that you can end up doing several tasks not directly related to your role. And I’ve been very lucky to be able to participate and even add few changes to one of our events : Envoy and Service Mesh immersion day, a side event of Kubecon 2022. I’ve added few community talks and also open a CFP to accept external talks…let’s see how it goes in few days.

And finally the human part. You end up working with people several hours each day, so it’s important to take that relationship to the personal space, with a bit of fun and non-work conversations. And I’ve been very lucky to have beers, a calçotada, lunchs with this amazing group of people.

I’m super eager to continue growing with this team and company and see which great things we can do in the near future…. from my side, I will stop learning !!!!!

Ohhhh, I almost forgot….. we are hiring !!!!!!

Posted in Uncategorized | Leave a comment

MapStruct to decouple and translate APIs

With this article I would like to share my experience creating a decoupled REST API in terms of the model entities and the views, and also add how easy it was to add a translation layer.

Basically the problem I would like to cover is what I’ve seen in many APIs, the model entities coming from the ORM are the ones used to model the API and also the ones returned.

My basic point of view is that an API should always be contract-first, and designed according to what the consumer is going to need, not the usual way of designing APIs that are mere CRUD approaches to the DB.

Considering this we started creating our API using APICurio and Microcks, with the Frontend people, considering what was needed to be painted in the screen as the information that the API needed to return.

In this case Frontend was simply one of the posible consumers, and it is not concerned about the way we internally store data, where and which structure.

Do you think that makes any sense to that 2 APIs doing exactly the same have different designs because one is storing data in PostgreSQL relational tables, and the other is storing documents in MongoDB ? Ok, that’s what I thought.

First Step

Design your API according to the consumer needs, collaboratively using Apicurio free SaaS. From that point both consumer and producer can work separately.
Our approach was to create Data Types with samples, then create the endpoints (paths) using those types. Later we will see how to modify those samples using expression language to do the tests and mocks on Microcks.

Second Step

Make Apicurio to create the entities of the DTOs for you.

This will generate a bunch of POJOs with JSON annotations, as long as JaxRS resource handlers, in a zip file (or git repo).
We used the Quarkus Jax-RS target for our DTOs.

Third Step

Create your Services , Entities to store your information in your persistence layer. In our case we are using Quarkus and Panache Hibernate.

Fourth Step

Map the model entities to the response DTOs using MapStruct. This library basically hooks in build phase and generates an implementation class of an interface or abstract class containing several mutators use.
So, in summary you have source object, target object, and MapStruct will iterate over the public fields of target, doing a target.setField(source.getField) , using same name in both ends as default approach. This is very good for Quarkus as it happens on build phase so no need of reflection is used in runtime.

To do that we are going to create one class , in fact an abstract class with empty methods for the direct mappings.

@Mapper(componentModel = "cdi") 
public abstract class AssessmentMapper {

A mapping is basically a method with a source field and a return field, and MapStruct will create in build time an implementation that for all of the return type fields will do a set from the source object. It will consider same field name in both sides unless we modify that with @Mapping annotations.

@Mapping(target="questionnaire", source="assessmentQuestionnaire")
@Mapping(target="stakeholderGroups", source="stakeholdergroups")
public abstract AssessmentDto map(Assessment assessment);

Fifth Step

Create the Translation entity and Service

In our case we have chosen a decoupled model for translation with a single table, with key,language and text. This key is a pattern formed by [table name + row id + field] , this way we can translate everything without hard constraints and relationships, and even logical concepts, static values, etc, not only DB values…. and also it’s easily expandable. To translate something but not now, there’s no need to modify the entity to be translated.

For that we have our TranslatorSvc and the Translated_text entity.

Sixth Step and last

Add the translation logic to your MapStruct mapper.

Our approach has been passing all the translation responsibility to the mapping service, to decouple as much as possible. Injecting the Translation Service in the mapper.

So in the mapping for a certain field we will specify a function :

@Mapping(target = "description", 
                 question.description, language, \"description\"))")
public abstract AssessmentQuestionDto map(AssessmentQuestion question, @Context String language);

With the expression we can specify a particular java code that will be called on the assignment. So the above case will be translated by MapStruct into

question.setQuestion( translateQuestion(question,question.questionText,language,"question") );

Then in the same mapper abstract class we will include the methods needed to do the translation, that in summary they create a key, the query the DB to obtain the text in the specified language and the return that value or a default one.

Also important to note the use of @Context String language as the parameter for the language that will not be considered part of the mapping but something to be used and passed through.

And that’s it for the experience, hope it can help you in any way, and don’t hesitate to contact me if you have any doubt.

Slitzvaitz !!!

Posted in Uncategorized | Tagged , , , | Leave a comment

Migrating SpringBoot PetClinic REST to Quarkus

In this post I’m going to cover my experience migrating the Spring Boot PetClinic REST application to Quarkus, in order to check how hard it can be and also to see which are the metrics I obtain at the end.

This is only an experiment with an application with low complexity but touching several common libraries and concepts used by anyone that creates a Spring Boot application.


My experience developing applications using SpringBoot framework has been :

  • tests last ages
  • artifacts generated are big
  • applications consume lots of resources
  • so many things happening under the hood
  • services started without request
  • easy to code as the framework makes things simpler
  • private company opensource solution

And I read about Quarkus and apparently it is :

  • easy to code
  • focused on GraalVM compilation
  • opensource standard libraries used
  • fast and light

So, I decided to check those claims migrating a simple project that uses SpringBoot in order to see if it’s easy and production ready the mind migration for someone that is very used to code using SpringBoot.


SpringBoot PetClinic REST project , github repository :

Quarkus migrated project , github repository :


SpringBoot PetClinic RESTQuarkus PetClinic REST
Spring Data ( repositories, jdbc , … )
Spring Web ( REST  )
Spring Security
Spring documentation ( Swagger )
Spring actuators
Spring micrometer
Spring CDI
Spring AOP
Spring cache
Hibernate Panache
Quarkus Security
SmallRye Health
Microprofile Metrics
CDI Spec ( Arc )

Quarkus cache ( Caffeine )

Elements NOT migrated

  • Spring JDBC Querying
    • no helper methods to work with Inserts, Updates….
    • no equivalent to org.springframework.jdbc.core classes
    • we need to reimplement everything using AGROAL
  • JMX
    • not supported by GraalVM definition

There are two ways of migrating the application :

  1. Option A : moving from Spring to standard libraries
  2. Option B : keep using Spring interfaces and not touch your code

Migration steps Option A : to Standard libraries

This option involves moving from Spring API interfaces into new libraries as JAX-RS, Panache, Microprofile , Hibernate validation, Quarkus Security.


  • Replacing
    • @Autowired -> @Inject
    • @Component, @Service -> @ApplicationScopped


  • Repository classes to implement PanacheRepository<T> ( Identity type is a Long )
  • no annotation built-in beans injection depending on Profile
    • but we can do it manually


Move from Spring REST to the standard JAX-RS annotations

  1. @RestController ——> @Path
  2. @RequestMapping —-> break it down into next annotations
  3. @GetMapping —–> @GET
  4. @PostMapping —-> @POST
  5. @PutMapping —–> @PUT
  6. @DeleteMapping —> @DELETE
  7. @PathVariable —> @PathParam


  1. Replace
    • @PreAuthorize(“hasRole(@roles.ROLE_ADMIN)”) by @RolesAllowed(“ROLE_ADMIN”)

2. Add Elytron extension to persist security in database : quarkus-elytron-security-jdbc extension

3. Configure the extension on properties.file


  1. configured CORS in the file


  1. Add smallRye metrics extension
  2. Annotate each method ( for custom metrics )
  3. Enable Hibernate metrics in properties file


  1. Spring Validation to Hibernate Validator
  2. Move from @ControllerAdvice to JAX-RS ExceptionMapper

OpenAPI Doc

  1. Add extension “openapi”
  2. extend Application class

Local Caching

  1. Spring uses a default ConcurrentHashMap
  2. Caffeine uses a  ConcurrentLinkedHashMap
  3. Add “cache” extension ( Caffeine ) and annotate the method
  4. Configure each cache behaviour in properties file

Migration Steps – Option B : using Spring interfaces

This option involves using the spring quarkus extensions, and not change your code if you are not using a not supported feature.

There are features not supported in some of the Spring extensions, so better check them if you want to use this path.


  1. add spring-web extension


  1. add spring-di extension


  1. add spring-data-jpa extension


  1. add spring-security extension



  1. MockMVC -> RestAssured

Test Resources

  1. Annotate test suites with @QuarkusTest to boot the app
  2. Annotate test suites with @QuarkusTestResource to load an embedded resource

Test Mock

  1. Use the quarkus-mockito dependency : quarkus-junit5-mockito
  2. Annotate mocks with @InjectMock

Performance Comparative

Spring BootQuarkus HotspotQuarkus GraalVM
4.3 s
42 MB
13 s
97 MB
185 s
6.8 s
251 MB
2.6 s
21 MB
0.462 s


Presentation at DevNexus

Video :

Slides :


  2. @QuarkusIO

Interactive Tutorials

Cheat Sheet

To start coding with Quarkus

Red Hat MTA (Migration Toolkit for Applications)

This is an opensource tool to help migrate application from different sources to different targets :

  1. Apache Camel 2 to Apache Camel 3
  2. Oracle WebLogic and IBM WebSphere to JBoss EAP
  3. Oracle JDK to OpenJDK
  4. On Prem to Cloud & container readiness
  5. Spring Boot to Quarkus

It consists on a rules engine and several rules ( > 1500 rules ) to statically analyse Java applications (packaged or source code) and give hints of changes to apply in order to move the application from the source to the target.

Real Success Cases

LufthansaLufthansa Technik AVIATAR experiences significant cloud resources savings by moving to Kubernetes-native Quarkus (link)
asiakastietoSuomen Asiakastieto Oy chooses Quarkus for their microservices development (link)
VodafoneVodafone Greece replaces Spring Boot with Quarkus (link)“Quarkus offers by default (without trying to optimize it) is 50%-60% more lightweight (in JVM mode) that what Spring offers”
“30 to 40% better developer productivity vis-a-vis Spring Boot,”
Public cloud internal labSave up to :37 % on Cloud ( Quarkus JVM ) 
71 % on Cloud ( Quarkus + GraalVM )
Posted in Uncategorized | Tagged , , , , , , , , | 5 Comments

End2End test with Testcontainers…. and a lot of patience

This time I would like to show my experience creating an End2End test for a Camel integration application that was connecting this layers :
* Apache Kafka
* Apache ActiveMQ Artemis
* PostgreSQL
* Localstack ( AWS similar )
* Red Hat Ingress upload service
* Minio ( AWS similar )
* KIE server ( rules engine )
* Apache Camel rest endpoints. (<– the app)

The application is a Spring Boot one, with several Apache Camel routes that expose a Rest endpoint to upload a file, then several steps of transformation (enrich), sending it to an external service that will validate it and send a message to an Apache Kafka broker. The integration app then will read that topic, process the message (with a file) , split it, enrich it, send it to a KIE server, execute some rules to do some calculations and then receive its response as a report, and store it in jpa layer.

The approach chosen has been to use real instances of every layer and avoid mocks and fakes in the integration layer.

The main motivator is to execute this kind of test on the CI runner ( TravisCI in this case ), therefore we could start from a base version of Linux and install all the layers needed in order to our Camel app to use them, OR we could use Docker containers for each layer with ready to use instances. Guess what ? we choosed the later 😉

The library that can help us with that is TestContainers , it helps us on the creation of Docker containers . It already has dedicated classes for some tools, but for the rest it’s easy to specify the docker image and start it.

You can check the code here :

The easiest container to be created is PostgreSQL :

public static PostgreSQLContainer postgreSQL = new PostgreSQLContainer()

This is a pre-bundled instance , and as we use a ClassRule the instance will get started automatically. If you create the instance out of a JUnit rule you will have to .start() the container. It will auto-create the database defined and with those particular credentials.

Next layer is the AMQ Artemis one, that will use a GenericContainer where we specify the DockerHub container image to use

public static GenericContainer activemq = new GenericContainer("vromero/activemq-artemis")
        .withExposedPorts(61616, 8161)
        .withLogConsumer(new Slf4jLogConsumer(logger).withPrefix("AMQ-LOG"))
        .withEnv("DISABLE_SECURITY", "true")
        .withEnv("BROKER_CONFIG_GLOBAL_MAX_SIZE", "50000")
        .withEnv("BROKER_CONFIG_MAX_SIZE_BYTES", "50000")
        .withEnv("BROKER_CONFIG_MAX_DISK_USAGE", "100");

Now I will take the opportunity to introduce the networking concept. Testcontainers will expose random ports for each container in order to avoid any collision. You only need to specify the internal ports exposed and Tc will create random ports that you later can get doing activemq.getContainerIpAddress() to obtain the IP and activemq.getMappedPort(61616) to obtain the external port for that internal port.

Also here you can see the logging concept. In this case we are echoing the internal log for the container into logger . Defined at the top of the class as :

private static Logger logger = LoggerFactory.getLogger(EndToEndTest.class);

For the Localstack environment we will use an OOTB image where we will define which services we want to use. With this image you can use any region, any bucket and any credentials when you connect to it and it will store it anyway :

public static LocalStackContainer localstack = new LocalStackContainer()
        .withLogConsumer(new Slf4jLogConsumer(logger).withPrefix("AWS-LOG"))

In this particular use case, we need 4 containers to share the same network as they connect to each other using the machine name not the IP. To allow this particularity Tc provides the Network concept.

You can create an instance of Network and use it in your containers .withNetwork, and they will be in the same network. And exposing the name defined in .withNetworkAliases

Network network = Network.newNetwork();

GenericContainer minio = new GenericContainer<>("minio/minio")
         .withCommand("server /data")
         .withLogConsumer(new Slf4jLogConsumer(logger).withPrefix("MINIO-LOG"))
         .withEnv("MINIO_SECRET_KEY", "uvgz3LCwWM3e400cDkQIH/y1Y4xgU4iV91CwFSPC");

GenericContainer createbuckets = new GenericContainer<>("minio/mc")
                     .withLogConsumer(new Slf4jLogConsumer(logger).withPrefix("MINIO-MC-LOG"))                    .withCopyFileToContainer(MountableFile.forClasspathResource(""), "/").withCreateContainerCmdModifier(createContainerCmd -> createContainerCmd.withEntrypoint("sh", "/", "minio:9000"));

Also we can see that the createbuckets container will be created after the minio one because it uses the .dependsOn(minio)

This is particular tricky as this network concept gave some issues not easy to find specially with kafka and minio. At the beginning we had a Docker-Compose file and this worked fine on local but not on Travis CI. So we decided to move the containers in the docker-compose to individual Testcontainers instances, and also use the OOTB kafka container instead of a generic one using the image.

Another element of our infrastructure was Red Hat Ingress service. We know the github repo, and it has a Dockerfile in order to build the Docker image. So what we did was :
1. download the zip file from the github project in a particular commit (the one we know it works)
2. unzip the file
3. change the folder name as apparently having a very long folder name causes the build process to fail
4. create the fly-build with Testcontainers

GenericContainer ingress = new GenericContainer(
new ImageFromDockerfile()                     .withDockerfile(Paths.get("src/test/resources/insights-ingress-go/Dockerfile")))
.withEnv("INGRESS_MINIOENDPOINT", "minio:9000")
.withEnv("INGRESS_KAFKABROKERS", "kafka:9092");

We use new ImageFromDockerFile().withDockerfile(…file…) to start the build of the image that will be used in the container.

Once we have all our containers started , we can inject the endpoint urls inspecting the containers. In this case as we use Spring Boot we are using an ApplicationContextInitializer static inner class.

public static class Initializer implements ApplicationContextInitializer {
    public void initialize(ConfigurableApplicationContext configurableApplicationContext) {
    [ .... start the containers ... ]
        "amq.server=" + activemq.getContainerIpAddress(),
        "amq.port=" + activemq.getMappedPort(61616),

In the case of Kafka we will use .getBootstrapServers()

For our project with rules, we first tried to use Business Central + KIE , but we had several problems trying to deploy the artifact from BC. So we changed the approach to deploy directly into KIE. So we configure KIE to connect to a maven repository and we send a REST call to it to deploy an artifact (along with all dependencies)

kieContainerBody : 

{"container-id" : "xavier-analytics_0.0.1-SNAPSHOT","release-id" : {"group-id" : "org.jboss.xavier","artifact-id" : "xavier-analytics","version" : "0.0.1-SNAPSHOT" } }

new RestTemplate().exchange(kieRestURL + "server/containers/xavier-analytics_0.0.1-SNAPSHOT", HttpMethod.PUT, new HttpEntity<>(kieContainerBody, kieheaders), String.class);

There was also a nice feature of Tc allowing us to modify the entypoint of a Docker container, and also copying a file in the container before creating it. With this we create the buckets in the minio instance.

                    .withCopyFileToContainer(MountableFile.forClasspathResource(""), "/")
.withCreateContainerCmdModifier(createContainerCmd -> createContainerCmd.withEntrypoint("sh", "/", "minio:9000"));

In the Camel part we create the context without starting it, and we advise the S3 component in order to check later that the file has arrived to S3.

You can check all testing strategies used in Apache Camel here in my other post :

Also mention that as some processes are assync we have used Awaitility in order to be checking that the report has been created ( every 100 milliseconds ) and consider an error if in X milliseconds the report hasn’t been created.

new RestTemplate().postForEntity("http://localhost:" + serverPort + "/api/xavier/upload", getRequestEntityForUploadRESTCall("cfme_inventory-20190829-16128-uq17dx.tar.gz"), String.class);
        .atMost(timeoutMilliseconds_PerformaceTest, TimeUnit.MILLISECONDS)
        .until(() -> {
            ResponseEntity workloadSummaryReport_PerformanceTest = new RestTemplate().exchange("http://localhost:" + serverPort + "/api/xavier/report/2/workload-summary", HttpMethod.GET, getRequestEntity(), new ParameterizedTypeReference() {});
            return (workloadSummaryReport_PerformanceTest != null &&
                    workloadSummaryReport_PerformanceTest.getStatusCodeValue() == 200 &&
                    workloadSummaryReport_PerformanceTest.getBody() != null &&
                    workloadSummaryReport_PerformanceTest.getBody().getSummaryModels() != null);

Comments to the experience :
1. at the moment we can not see the KafkaContainer logs, but Tc community is fixing it.
2. in the connection to minio, as Ingress is using the name not the IP to send the file, when it obtains a presigned URL (that takes also the IP into account) it gets minio:9000 as the host. We need to replace this with the IP address, but then minio will complain as the signature is not correct…. To solve this we send the HTTP Header “Host:minio:9000” and then it’s solved.

Hope this experience may help you.

Posted in Uncategorized | 1 Comment

Testing Apache Camel with Spring Boot, my experience

Hi, in this post I would like to share my experiences testing an application with #ApacheCamel routes using (for the moment) #SpringBoot.

So my first Test Case started like this

@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD) @SpringBootTest(classes = {Application.class})
public class XmlRoutesTest { }

And this was my first route that I tried to test :

<route id="test-route-ma" trace="true">
    <from uri="jms:queue:inputDataModel" />
    <log message="Message received" />
    <to uri="log:INFO?showBody=true&amp;showHeaders=true" />
    <bean method="createRandomMigrationAnalyticsCommand(${body})" ref="decisionServerHelper"/>
    <to id="decisionserver" uri="direct:decisionserver"/>
    <bean id="route-extract-reports" method="extractReports" ref="decisionServerHelper"/>
    <log id="route-log-totalPrice" message="totalPrice = ${body.totalPrice}"/>
    <to uri="jpa:org.jboss.xavier.integrations.migrationanalytics.output.ReportDataModel" />

1. My first goal was to be able to disable all routes in the camel context , as some have timers, and only have this route started.

So I added @UseAdviceWith to the class annotations. This will disable by default the start of the Camel context, done by Spring boot automatically.

After that , the next step is to disable all routes from auto starting and then start the camel Context.

public void test0() throws Exception {

2. Next step was to “replace” the starting endpoint of the route as it is a jms adapter and I don’t want to depend on a broker in order to inject a message ( there’s also a way to replace that endpoint with seda , an asynchronous endpoint ).

So, for that I added an initialization code using adviceWith that will replace the FROM endpoint :

public void setup() throws Exception {
    camelContext.getRouteDefinition("test-route-ma").adviceWith(camelContext, new AdviceWithRouteBuilder() {
        public void configure() {

This way I have created a direct endpoint I can use in my test.

3. Next step was to Mock ( in this case Spy ) the Bean used as it is using a 3rd party layer and I will test that in a separated unit test.

And for that I injected the Spy using Spring

DecisionServerHelper decisionServerHelper;

And using Mockito I set the return when a concrete method is called, in the setup method


4. I needed to Mock an intermediate TO endpoint. In production this endpoint calls another route that processes the information received, does some stuff and returns. I will test that route in a separated test.

For that we need to tell Camel it needs to create a mock: endpoint


So I added this class annotation to mock 2 endpoints. Interesting here to mention that I’m not using @MockEndpoints because in that case Camel will insert a mock endpoint before the real endpoint, and the message will also be sent to the real endpoint. In my case I don’t want to do that because that would imply to start another route….. With @MockdEndpointsAndSkip we are skiping the message to be sent to the real endpoint.

After that I need to use the weaveById to insert something after the mocked endpoint as simulating the return of the other route . This code is inside the setup method.

weaveById("decisionserver").after().process(exchange -> exchange.getIn().setBody(new ServiceResponse<ExecutionResults>()));

5. I need to set the expectations on the mocks in order to test the right values have arrived.

So I have to inject the mock endpoint in a variable and I will use it later to set the expectations.

@EndpointInject(uri = "mock:jpa:org.jboss.xavier.integrations.migrationanalytics.output.ReportDataModel")
private MockEndpoint mockJPA;

And in my test method, before starting the camel context, I added this code :


6. Now I only need to start the route and assert the expectations in order to see if the route worked as expected. And also start the route and send the Body message to the first endpoint.

public void test0() throws Exception {


    camelContext.createProducerTemplate().sendBody("direct:inputDataModel", getInputDataModelSample());



Mock Headers Expected : apparently with Apache Camel 2.21 ( the one included in Fuse 7.3 ) there is a bug ( fixed in 2.23 ) that when a mock has the ExpectedHeaders but no message arrives to that mock, it doesn’t complain and the test doesn’t fail. This has been fixed on 2.24 and backported to 2.23 ( )

Rest DSL and route ids : apparently when we have a route using Rest DSL , camel will duplicate each route into 2, therefore we will experience issues when assigning a custom id in order to start only that route ( )

Http4 : when we have endpoints with http4 component (e.g. “http4://localhost:8080” ) in our tests we need to mock http4:localhost:8080


With the help of the Apache Camel community, on gitter, and specially Claus Ibsen, I’ve understood better how to test routes in Camel and specially how to do it when you use Spring Boot.

Using the annotations makes difficult, or impossible, to use the CamelSpringTestSupport that gives you more control on the mocks you create, specially if you have different routes tested in the same Test Case .

I’ve found that in order to test different routes, when you need to mock endpoints in one test and mock other endpoints in another test, the best way would be to create a Test Case for route ( I’m still investigating this ).

Hope this can help you a bit, and if you go further or discover wrong things used in this post , please let me know….I’m always learning.

By the code, the full code you can find it here :
( for the moment in this branch )

Posted in Uncategorized | 1 Comment

Fedora 29 , issues after installing playonlinux

In order to play to a singing game, I decided the other day to give it a try in my Fedora 29 system. I already did this years ago with my Ubuntu and later LinuxMint laptop, so I said “what can go wrong”…… life is a great teacher 😦

So, the trigger of this horror history was a

sudo dnf install playonlinux

Apparently everything was going fine, up to the point my screen went black and only a blinking cursor appeared in the top left corner.


Apparently something broke inside the libraries and I was not even able to log in as gdm also was broken.

sudo dnf reinstall gnome-shell

sudo dnf reinstall NetworkManager

sudo dnf reinstall gdm

With these commnads my Linux Fedora has become ready again

Posted in Uncategorized | Leave a comment

How to do better presentations, a training by Red Hat

Have you ever done a presentation in front of people and you said to yourself “there are things I dont feel they work and other people’s presentations look so great” ?

Hi, I’m Jonathan, a total beginner in the art ( or science ) to do presentations and I’m going to tell you how it was this training and what did I learn there.

First we introduced ourselves, seems easy….. well, bad news for you, it’s not. You are in front of people that eventually don’t know you, and you have to tell them who you are, why you are there, and what do you expect from the training.

We talked about the different aspects affecting your presentation : who are you, which is your level of knowledge, where are you going to present, who is the audience, what are the cultural aspects of them, which are their interests, why are they there, which are the technological aspects involving your presentation, in which language are you going to present, is your audience familiar with that language, and with that topic, how is the layout of your slides, and the amount of content, how are you going to use your voice, are you going to connect with the audience……

Who are you

Let’s start from the beginning….. who are you. Interesting. Who are you for whom ? your title in your company ? what tasks you really do ? your title in your personal adventures ? your family status ? …. you would think, well, your professional title…. But one super interesting thing I’ve learnt is that it’s not about you, it’s about them.
Is your professional title relevant to the presentation ? It could be you are delivering a talk about your personal projects technologies, so, does it really matters ? well, it could be ( specially if your company pays your T&E) but it’s not a must.
In fact introduction is something important, but not the goal of the people attending your talk. From what I’ve learnt, a whole slide with your kung-fu levels could be too much.

purpose concept on signpost


It’s very important to define which is your purpose for the presentation : Sell, Tell, Inspire, Educate ?
Once you have your purpose is important defining the statement for your presentation : I will [purpose] [audience] about [topic] so that they can [call to action]

Which is your level of knowledge

Seems obvious but it’s important to think about it. The presentation needs to motivate people, you are not going to do a master class in 40 minutes. So, knowing which is our level of knowledge and therefore study the topic it’s very important.

We used one technique very interesting. Write few questions you think people could ask you, then think if that information should be present in your presentation /slides , and be prepared to talk about those topics. Then ask other people with and without knowledge on the topic to write several questions , and do the same….incorporate to the presentation and/or study the topic.

Where are you going to present

This is also a very important topic. Go time before your presentation to know how is the place, where is your laptop located, are you going to see the audience ? ( some places have a very bright light pointing to the speaker if they are recording the session), where is the camera located ? ( you can point some of your expressions or hands to the camera in order to engage also the audience that will watch your video afterwards ), are you going to have water ? ( better if it’s a bottle, that you can open, close, and invest few seconds if you need to re-focus your mind, and also avoids spitting water on the floor if you catch it wrong compared to a glass )

Who is the audience

Obviously as we have mentioned before, it’s not about you it’s about your audience. So it’s important to know which are the roles you have in front of you : juniors, seniors, decision makers, in order to accomodate the message. Obviously if you have 30 people it’s not the same as if you have 200…. you can be more close, participative, with less people, so it’s also important to know ( if you can) how many people will be there.

Cultural aspects

Do you know that are cultures that tend to not express things in public ? I’ve heard about a talk in a country where people didn’t rise hand when asked, didn’t ask any question….but after the talk several people came to the speaker to ask and show gratitude. That’s important to know. Also there are things like expressions you can or can’t do in certain places, jokes better not do, colours in your dress that mean special things in certain places…. If it’s possible it’s better to know beforehand those cultural aspects that can influence your message.

What’s in their minds at that moment

Seems like a tricky question, but it’s not. If that day or days before/after there’s a big event, situation, that is affecting people’s minds it’s good to know it. You can know better if people would be focused ( a disaster that morning ) or if you can link your message with that event ( champions league final )

Which are their interests

Depending on the type of the audience , you can investigate which are their interests…. if you are going to have business people or technical people probably the message could differ. Also are them interested on a final conclusion to close an important decision or are them interested on learning more on something they already know, or are them interested on discover a “new” thing, or are them interested on entertaining with bits of technological stuff…. Definetely this will modify your message and your style.

Why are them there, and what they want/not want

Our trainer used a nice list of causes , using characters : explorer, tourist, prisoner. With explorers, they will be there to learn and discover with a very active attitude and because they want to experiment. With tourists, they were over there, passing by, and they said “ok, why not, let’s see what’s in there”…. they are not actively interested on the topic, but had nothing better to do. And finally prisoners, they are there because they are forced to, probably their company is talking , or their company sent them there but they are not interested.
Obviously it’s not easy to know why are them there, but if you can investigate and find out, definetely this will help you in order to know which level of details , or what can you expect of that audience.
You can also invest time trying to know what your audience want with your presentation, and more important what do they don’t want, in order to avoid undesired messages or levels of detail.

Technological aspects affecting the presentation

This is very important, as a conference organiser I’ve suffered of different issues that affected the speakers : no wifi, video output not working, wrong resolution, missing adapter, no battery on the slider, nottifications appearing during the presentation, conference not having a time counter, can you see your speaker notes ?, room too big and your slides have small font, you are gonna play a video but there’s no sound coming out.
So the advice is have your own adapters ( to VGA and HDMI ), ask with time in advance the resolution of the screen and the ratio ( 16:9, 4:3 ), ask if you need to use high contrast colors because the screen is not too bright, go before your presentation ( during a break ) and check your laptop connects well, and sound and video come out fine, close any app that could send any notification ( chrome specially )
Rehearse several times in order to see if your presentation fits in the expected time ( a bit less is better ).

Language of the presentation

This is also crucial. It’s not the same presenting on your native language than in a foreign language. You know your level of fluentness , so improve it if it’s low, review deeply syntax errors in your slides, and practice a lot. One important thing here is your voice, there are several aspects you need to take care : ennunciation, tone, speed, volume, pitch… Very important is the ennunciation, pronounce well and clear each word, use pauses to give more importance to a sentence….. We’ll talk about this later. When you talk in your native language , when you are lost you can make jokes, change the subject because it’s natural for you, if it’s in another language train that use case, like a joke or thing you can put somewhere, or simply go and drink water to get some seconds to relocate.
Also it’s important to know if your audience will be familiar with that language, in order to use or not use phrasal verbs, control the speed, use easier words, etc.

Level of knowledge in your audience

You know this is important….. it’s not the same to talk about something everybody knows and you are giving them a bit more knowledge, or talking about something totally new. You can not expect to give a master class in 40 minutes. Remember this pyramid :

So, think about if you are going to give too much detail or content, or too little, that for sure will impact in the outcome of it.

Layout of the slides

My training was more focused on commercial & official slides, that are a bit different than the technical conference talks. In case you are doing an official commercial presentation, definetely you would need to follow official guidelines.

Some advices that I took are :
* no bullets
* everything left aligned
* no gifs
* no fancy animations ( these two distract people )
* remove unneeded capital letters
* no transitions different than show-hide
* never same logo more than once
* consistent with sizes and colors : they have a meaning, don’t change it
* never underline
* be careful with images rights
* no cliparts
* no shadows and borders for boxes
* plain colors , no gradients
* pay attention on the direction/flow of the slide (top to down, left to right… )
* only 1 idea per slide
* do not show all items at once in a list, use animation to show one at a time. If you control what they see you control what they think on. If you show all items they brain will tend to read them all and stop where they want that can be a different item that you are talking at that moment….you want they follow YOUR sequence.

They also have these parts : introduction, body, closing, call to action . Always end with a call to action. Basically you need to close your presentation with the idea you want audience remember the most……last thing seen is the most remembered one.

In some cases you want to have a first black slide, in order for people to pay total attention to you, specially in the introduction.
The ways to start a catchy presentation are several, and we will talk about them in the next section, but in case of chosing question or striking fact, also having a slide with only a number, an image, etc, can also support your introduction.


Here is were I was very interested…. This is a very complex part, involving your voice, your body gestures, pauses…. Hard to follow and to improve, but we’ll try, won’t we ?

So the elements we will talk about are : voice, hands gestures, body, attitude.

With the attitude what I learnt was :
* smile, and have a open face most of the time, including a close face to create an effect
* if you can , before the presentation try to engage some individuals, talking to them, asking about the topic…. you can use them later to make your presentation more close including a direct reference to people in the audience.
* start your presentation with : question, striking fact, imagine, object use, analogy. Examples could be :
+ Do you know how long does it take per month to boot the machines in a cloud system ? ( audience answer several options ) …. 78 hours you say in the end.
+ 78 hours ( this number in the screen ) is the time our machines use to boot every month
+ Imagine having a system that can boot in a fraction of time of now and with less resources …..
+ ( with a cell phone in your hand ) With this object, only using this finger ( show the action ) I can reboot all my machines in a fraction of time because of X technology….
+ Remember when we tried to start phisically all machines manually in a company and it was tedious, error prone….this is what it is now to start our cloud systems….
* people love if you use a conversation style, and specially if you introduce personal thoughts, or experiences
* try to engage the audience asking a question for them to raise their hands, specially every X minutes in order to prevent boring or the attention period to end
* eye contact constantly… we tend to look up or down when we think, but we need to be aware of that and try to do eye contact with different people constantly in order to make them participants
* making jokes also engage people

With the body what I learnt was :
* we can tend to move back and forth, exagerately, because we are nervous.Plant your feet and be aware of that movement. It’s ok to walk if you really want to walk, or move forward and backward if you really want to.
* your body should be straight and tall directed to the audience
* for western cultures that read from left to right, it’s better to be in the left side of the screen as the eyes of the audience will see you first giving importance to the slide

With hands :
* be aware of your nervous relief mechanisms, as we often touch our finger, or roll our ring, or even put our hands in the pockets. It’s ok if you naturally do gestures, but you need to lead them.
* it’s important to show your palms, and always have your hands in front of you, never hide them
* it’s a good way of engaging people to support your choices with hands…. So as if you have an object (choice A) in your left and another object ( choice B) in your right.
* also use your hands to point the screen (if its possible)

Voice, a very important tool :
* be very clear, ennunciate clearly the words
* talk a bit loud…people need to hear you , even those in last rows. You can talk quiet in order to create a personal , intimate moment too.
* use the low speed to create expectation (attendees brain will try to complete sentences ), or fast speed to have a call to attention
* pauses are very important, and they can last just up to the moment you feel unconfortable. The important concept is that what it seems an eternity for the speaker is a fraction of time for the attendee.

Before presentation, aware of your nerves

It’s natural you will be nervous, it’s a programmed reaction “fight or flight” and your body will react : wet hands, increased heart beat, butterflies in your belly, narrowed sight, over excited legs, dry mouth, brain not very agile…. your brain is still considering that event as if it was in front of a lion.

There are several techniques that can help you in order to minimise its effects :
* run that morning, or use the stairs up and down
* distract your mind, playing games, talking with somebody, …
* positive self-talk : I’m the expert here, they are here to make me success, nothing crucial will happen after this talk
* eliminate unknowns, we have talked about this before
* rehearse, practice …. the more we practice the more instictive and natural things will happen
* be flexible, sometimes you will forget things, or incorporate new things…. or the audience will take longer on a question, etc…..
* remember : it’s only you who know what exactly are you going to say, if you forget something they won’t be aware

And that was all !!!! Hope you found this helpful 🙂

To finish here you can see my training videos… I’m very proud of the improvement, and also the long road ahead of me in order to do better presentations. Numbers or facts are total fiction, and the idea is to train a presentation.

And these are my slides…. I have to work more on them , as this is a result of the work of those 2 days…. very basic :

Posted in Uncategorized | 2 Comments

Devoxx BE 2018 ( Red Hat booth )

This year I had the opportunity to help Red Hat being in the Devoxx BE booth, and I didn’t thought twice in order to enroll this experience.


photo_2018-11-19_22-31-08I’ve been on the other side of a conference, the booth, only once before but not for many time….This experience was the full pack : helping to set up the booth, and being there to answer questions, engage people to follow the tutorials, talk them about, giving away Red Hat stickers and books about Istio and obviously talk to people, listen to their experiences.


It was intense, with days starting at 8.30 at the booth and finishing, even without seeing sun’s light, around 18.30. Eating the “food” (to put a random name on it) served by the conference, drinking coffee and drinks served all day long, and having to talk in English all day….. my brain and body get exhausted every day.


Said this I will put here my positive thoughts, my intense experiences and my outcomes.

I’ve met a super kind, highly skilled, funny, team of people from whom I’ve learned a lot. I started meting Burr and Kristen, seting up the booth, no matter the hierarchy on the company, putting tons of duck-tape as me to hide all the cables…..jajajaj was fun.

I have a great repect for all the colleagues, but specially for Kristen , coming from far away, being there constantly , taking care of the current conference but organising remotely the next to come. With some problems with the bike-path 😉 but helping everytime I needed… Thank you.

Also my two super fun colleagues Roel and Wian….. jajajaja they are energy infinite, super fun, and very skilled. It was awesome seeing them talking to people with questions at the booth….super easy. I would called them “Zipi y Zape” 🙂 Thank you pals .

Also our colleague Koen, with knowledge about history of Belgique….it was very interesting hearing those stories. Now I know the Antwerp harbour origins.

Tug, Stephan and Ruud were always helpful and very supportive, thank you for making those long days easier.

I would also mention that those talks with Burr about futures, blue things, development and history are always very interesting.

Apart from the team topic, I would also want to say that participating in this kind of activities gives you the opportunity to know a lot of people, if you want to listen. To hear about technologies and use cases you didn’t know. So I encourage YOU to do it if you have the opportunity…. but don’t be reactive ( yes, I said so…. ) be proactive. Don’t wait for people to ask, it’s you who has to ask about their knowledge, their interests. Don’t sell, simply tell them what you think, your positive passions about your company stuff.

Last but not least, I have to mention the city….. This is my second time in Antwerp, both because of Devoxx. But this time, thanks to “misunderstanding” at Bier Central, and the love for his city from Koen, I have discovered a beautiful and romantic city. Streets full of restaurants, with lovely lights and hiden corners….it’s a magic city I would love to come back and enjoy better.



Oh, yes, Devoxx….. I was about to forget. I’ve found the conference  as it was last time, this time the exhibition hall seemed to me way smaller. Food , well, “no hace falta decir nada mas”. I love to have coffee and drinks all day long. Rooms are super nice.

TShirt, well, I have to say JBCNConf has way way better tshirts, and I didnt find any Devoxx sticker. ( Dont think twice and come to JBCNConf 🙂 )


Well, that was my experience summary……. let’s move for the next adventure.


I met this guy, and I’m not sure what to ask :
* why you called it Null and not Nil ? and why the hell you put it anyway

* who is gonna die in the next chapter of Game of Thrones

* are you gonna bring me my pink bicicle down the Christmas tree ?


Slitzvaitz !!!

Posted in Uncategorized | Leave a comment

JavaZone 2017

This year I was very lucky to be invited to attend JavaZone, a conference I had heard of a lot, specially after having Rustam as speaker in past editions of the JBCNConf.

Here are my comments about the conference.


* big, very big
* a lot of space for sponsors, food, and networking areas
* 7 rooms for more than 200 ( probably way more ) people each
* 1 room with screen with all the rooms video, and headphones to select the room audio
* lots of toilets
* several staff people helping everywhere
* everything well signaled
* you have a central screen with some tweets about the conference and the next talks
* intro show was super electrifying and fun

* available all day
* along with coffee and drinks ( water, apple juice, … )
* some sponsors had special food-goodies like sweets ( chuches), ice-creams, corn flakes, local cola drink
* several themed food spots ( mexican, japanese, burger, … )
* everything was constantly refilled

* any little detail was perfectly managed
* you can see several staff people everywhere , and there’s always a stand of the organisation where you can go and ask.
* registration process is very fast, only bring your QR from EventBrite, they scan it and print your badge identification sticker
* it was new for me not to have a TShirt in a conference, but in exchange I got a fancy water bottle to use in the office
* it’s been my first conference without keynote and closing ( at least that I was aware of ), and probably, imho, it would be great to make all volunteers plus organisers appear on stage to show to all attendees who runs the event
* to my knowledge nothing failed, and if internally something failed it was totally and perfectly covered so I didn’t noticed
* to my knowledge all the talks were recorded and will appear in Vimeo

* I have to say that they were amazingly well set, motivated and organised
* everyone had goodies, food, and some raffles and entertainment activities
* probably the most exciting was one sponsor with car simulators to play racing games
* I tried one with VR , but you can see when one is not a gamer 😉
* Some had VR/AR games, one to find chilies on the stage
* stands were awesome, big ( 5×3 meter most of them), and perfectly built

* 2 pubs in walking distance from the venue
* drinks ( beer , cocktails, whisky, mojito … ) and soft foods for free
* live music at least in one of them, and free hair cut for some lucky winners
* too crowded so we had to wait a lot to get our drink
* we left early as we were tired and it discouraged us to wait too long for food and drink

* I’ve met again with some friends : Brian, Roland, Ben, Rustam, Alex, Paulina, Johan
* I didnt met any colleague from Spain

City , Hotel , Directions
* I took a small walk and I saw some nice streets near the station, with lots of fancy stores
* everything seems clean and ordered
* I used Norwegian to fly
* flight from BCN at 15.45 + 1.5 hour of delay, took 3 hours
* flight from Oslo at 20.00 + 25 minutes of delay, took 3 hours 20 minutes
* once in the airport I used FlyToGet train service to get to the City center
* there are machines in the airport to buy the tickets
* it departs every 10 minutes and it takes around 20 to get to the Oslo Central Station
* train has free wifi
* I used the hotel RadisonBlue Plaza Hotel
* it’s in front of the venue and 2 minutes from the train station
* rooms and breakfast are good
* it includes free wifi

* lots of talks ( 7 tracks in 8 sessions per day )
* 20 minutes break after every talk, no other breaks
* high audience in almost every talk I attended
* unfortunately some interesting topics were in Norweish so I couldn’t attend
* some great talks specially : Bert Jan Schrijver , Alex Soto, Mark West
* workshops were on Tuesday, but I didn’t attend any

* I would say it’s definitely worth it to go, and live this good experience . You will have plenty of time to attend the conferences and do some networking , eat, talk with sponsors during the day without having to sacrifice any talk.

* Thank you to all staff members, you rock guys and you have made an amazing conference AGAIN !!! 🙂 🙂


Posted in Uncategorized | Leave a comment

Participar o no participar, that’s the question

En estos dias le he estado dando vueltas al tema de la participacion de la comunidad de desarrolladores en los eventos.

Tenemos varios fenomenos que nos vienen sucediendo. El primero de ellos es la baja participacion en muchos de los eventos y por otro lado la falta de seriedad de algunos que se apuntan y luego ni se presentan.

En este post me gustaria hablar del primer fenomeno que es la baja participacion en algunos eventos.

Basicamente creo que hay dos factores que motivan o deberian motivar a los desarrolladores a asistir a los eventos. El primero es el entretenimiento y el segundo la formacion.

Para el primer factor del entretenimiento encontramos que basicamente a un ser humano lo nuevo, excitante, y que me permite soñar saliendo de mi realidad de cada dia es lo que mas nos motiva. Y en ese area es cuando encontramos las tecnologias llamadas trendy, aquellas que tienen un logo chachy guay, una web responsive ( si tiene parallax ya es la leche ), que son presentadas por los speakers de moda ( algunos cobrando ) y que ademas se venden con cierto populismo : las otras tecnologias lo han hecho fatal aqui y alla y yo vengo a salvarte pequeño saltamontes ( me recuerda a las campañas politicas, a ti no ? ). Para este punto no es muy necesario calentarse mucho los cascos, con traer speakers de referencia con tecnologias propias de un hipster lo tienes ya todo muy arriba.

Pero, que pasa con el otro punto ? Con la formacion ?

En este apartado yo me refiero a la formacion en la base, en las tecnologias que usamos cada dia en el curro. Aquellas tecnologias que en realidad en muchos casos nos aburren, nos recuerdan nuestra miseria del dia a dia (en algunos casos), que no nos aportan nada super cool y que ademas tienen webs sin efectos ni imagenes….buahhhhh Como me dijo un compañero : estas tecnologias son como la verdura , que nos la comemos porque nos la ponen, pero nada mas.

En este apartado veo un gran interes por parte de las compañias para tener gente mas preparada, que produzca mejor codigo….es decir, pasta gansa …. dinerito, margen que les queda porque se produce mas y mejor. Y por tanto aqui las compañias deberan hacer de la abuela que nos pone el plato de judias verdes con patatas, nos dice lo buenas que son para el cuerpo pero que ademas al final les pone un pegotazo de mayonesa porque sino no hay huevos a comerse eso…. Tenemos ademas una gran “cualidad” los developers, que usamos lo que vemos que otros usan , pero no tanto lo que otros nos venden sin usar…. asi que para que los developers de un equipo se muevan y vayan a las charlas , la empresa debera construir el rol “abuela” con la complicidad de los tech leads para que con el ejemplo y la dinamizacion regular los demas vayan poco a poco viendo algo importante y necesario comer las judias verdes ( you know what I mean, righ ? ). Para ello se me ocurren varios mecanismos, como puede ser el “monthly explorer” que se encargara de tener a una persona que durante un mes ira a varias charlas y luego las explicara dentro del equipo compartiendo el conocimiento, o las charlas internas sobre diversos temas fomentando tambien el acto de evangelizar…..montones de ideas pueden surgir con el mind-set adecuado.

Que te parece ? Como crees que se podria dinamizar a la comunidad ? o , crees que la comunidad ya esta suficientemente dinamizada ?


Posted in Uncategorized | 2 Comments