Monitoring Camel-K applications on Openshift using the Fuse Console — Part 2 (Kamelets)

Sadhana Nandakumar
4 min readFeb 1, 2022

In an earlier article, we discussed how we can add the Jolokia trait to monitor Camel-K integrations. In this article, we will see how this can be done for Kamelets.

Kamelets (Kamel route snippets) is a new concept introduced in Camel K that allows users to connect to external systems via a simplified interface, hiding all the low-level details about how those connections are implemented. There is a community-driven catalog of reusable Kamelets (Camel route snippets, i.e. connectors) that can be used to stream data from/to external systems into any platform powered by Apache Camel. The catalog definition can be found here.

Let us assume, that we have an integration to read a message from an AMQ broker and push it to a Kafka topic. We can very easily reuse the kamelet definitions from the catalog and create this integration.

Each Kamelet is basically a route template with configuration properties. You need to know which component you want to get data from (a source) and which component you want to send data to (a sink). You connect the source and sink components by adding kamelets in a Kamelet binding as illustrated.

As a prerequisite, we will set up an AMQ Broker with the AMQP protocol exposed.

We will also set up a queue named myqueue. We will also set up a Kafka broker and create a topic called process-topic.

We will also install the Red Hat Fuse console so that we can monitor the integration. Check out my previous post on instructions to set up the console using operators.

Let us now define the binding for the AMQ source. For this, we will use the AMQP Source Kamelet and the Kafka Sink Kamelet. The Kamelet binding for this integration would look like this.

We will now need to add the Jolokia trait to the Kamelet binding. The Jolokia trait activates and configures the Jolokia Java agent. By enabling this trait, we can register the integration with the fuse console. You can easily tune your KameletBinding with traits configuration adding .metadata.annotations.

Let us install the Kamelet binding on the namespace.

kamel installoc create -f amqp-to-kafka.yaml

Once the integration is built and deployed, you should see it appear on the Fuse Console.

We can now push a message from the AMQ broker and monitor the routes.

Notice how the source, sink, and route1 definitions show up on the left palette. The route definition for route1 is fairly simple with a source and destination.

Let us now explore the source route.

You can see the route definition of the Kamelet along with the exchanges completed. A quick look at the sink route.

Notice how the Kamelet definition hides a lot of complexities and exposes a clean interface to use, and the fuse console still provides an easy way to monitor these.

References:

Kamelets Documentation

https://github.com/snandakumar87/kamelet-monitoring

Monitoring Camel-K applications on Openshift using the Fuse Console

--

--

Sadhana Nandakumar

Sadhana is a Sr Technical Product Marketing Manager specializing in Salesforce Platform