Transforming CSV to Java Objects using Camel

This tutorial shows how to perform a simple transformation from CSV to Java objects with Camel using as destination a processor or a JMS Queue. First of all, we will define a class mapping our CSV file. package com.sample.model; import java.io.Serializable; import org.apache.camel.dataformat.bindy.annotation.CsvRecord; import org.apache.camel.dataformat.bindy.annotation.DataField; @CsvRecord(separator = “,”) public class User implements Serializable { @DataField(pos … Read more

Using the Timer Component with Camel

The Timer component is used to generate message exchanges when a timer fires. The Timer is a simple, non persistence timer using the JDK’s in built timer mechanism. package com.sample; import org.apache.camel.CamelContext; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; import org.apache.camel.spi.DataFormat; public class Timer { public static void main(String args[]) throws Exception { CamelContext … Read more

Using Camel JDBC Component

In this tutorial we will learn how to perform some basic JDBC operations using Camel JDBC Component. The JDBC component enables you to access databases through JDBC, where SQL queries (SELECT) and operations (INSERT, UPDATE, etc) are sent in the message body. This component uses the standard JDBC API. In the following example, we will … Read more

Using Camel Netty Components to manage socket routes

The netty component is a socket based Caamel communication component, which relies on the Netty project. Netty is a client server framework designed around Java NIO API which enables fast and simple development of network applications either servers or clients. The advantage of using Netty is that it greatly simplifies network programming by means of … Read more

Using Camel Log component

Camel includes out of the box a Log Component that is useful for debugging, making easy to trace the content of the messages flowing through your routes. Typically this component is used just temporarily when developing your routes and it’s expected to be removed in production. Let’s see an example of how to use it … Read more

Invoking a jBPM 6 Process from Camel Spring

The Camel jbpm component provides integration with Business Process Management (BPM) Suit jBPM 6. Behind the hoods It uses kie-remote-client API to interact with jBPM instance over REST. Let’s see an example of it: Say you have the following process available from the business central of jBPM: The following sample blueprint shows how you can … Read more

How to configure an MDB singleton in a cluster

In this tutorial we will provide details how to configure MDB deployments as Clustered Singleton MDBs on WildFly 10 or later. First of all, what is a “Clustered Singleton MDBs” ? they are a special kind of MDB which is deployed in a cluster; however only one node is active to consume messages serially. When … Read more

Configuring Messaging JDBC Persistence Store on WildFly

In this quick tutorial we will learn how to configure WildFly 11 (or later) to use JMS JDBC Store against a RDBMS. WildFly 11 JMS Broker, Apache ActiveMQ Artemis, ships with two persistence options: The File journal which is highly optimized for the messaging use case and gives great performance JDBC Store, which uses JDBC … Read more

Configuring JVM settings on Openshift

In this tutorial we will learn how to configure JVM settings for WildFly Container running on Openshift. More in detail, we will see how to apply Compute resource constraints to shape the JVM memory settings. The recommended option to set JVM memory settings for WildFly / JBoss EAP is to use resource constraints. Resource constraints … Read more

Configuring a Cluster of Artemis MQ servers

In this tutorial we will learn how to learn how to install and configure a cluster of Artemis MQ servers. ArtemisMQ is the default broker for WildFly 10 and it’s based on the former HornetQ messaging broker. As for HornetQ, you can either run a cluster of brokers embedded into the application server or as … Read more