Routing Camel messages to Artemis embedded in WildFly

This is the second tutorial about Camel 3. In the first one (Getting started with Camel 3) we have discussed how to set up a basic Camel 3 projects and run a simple demo with it. Now we will show how to use the messasing API to connect to a remote ArtemisMQ embedded in a … Read more

Getting started with Camel 3

Let’s have a look at what’s new in Camel 3 with an example project which shows how to run a Camel 3 standalone via the built-in Main class. This example also demonstrates how you can configure the Camel application via Camel built-in dependency-injection that supports binding via the @BindToRegistry and @PropertyInject annotations. Apache Camel 3 … Read more

Calling a JAX-WS Web service from Camel

In this tutorial we will demonstrate how to invoke from Camel a JAX-WS Web service running on WildFly, without writing a single line of code. First of all, here is the Web service implementation: import javax.jws.WebService; @WebService public class SimpleWebSevice implements Simple { @Override public String hello(String s) { System.out.println(“Called Web service with: “+s); return … Read more

Proxy Web Services request with Camel

In this tutorial we will show how to proxy a request to a legacy JAX-WS Web service using Camel. A common scenario is that you have some legacy code (say some Web services) which cannot be reused becuase the interfaces or some conventions (e.g. namespaces) have changed. Proxing request to legacy code can also be … Read more

Debugging Camel Routes with JBoss Developer Studio

JBoss Developer Studio has been vastly improved to let you develop and test your Camel routes. Debugging Camel routes has never been easier! Just open the Designer. As you can see, if you hover the pointer on a Component which can be debugged, two options will turn on: The first one (The red one) will … Read more

HelloWorld Camel tutorial

The following is the most basic example of data integration using Camel. We will show how to copy files from one folder to another using a simple Camel route. Provided that you have downloaded Camel, launch your IDE and create a simple Java project containing this class: import java.util.Scanner; import org.apache.camel.CamelContext; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; … Read more

Building a Camel route to remote ActiveMQ

In this tutorial we will demonstrate how to create a simple Camel route which sends messages (based on a timer) to an ActiveMQ server. So first of all, let’s start ActiveMQ and verify that it’s listening on the TCP port: For example on a Windows machine: C:\>netstat -an | find “61616” TCP 0.0.0.0:61616 0.0.0.0:0 LISTENING … Read more

Simple Transformation with Camel

Camel provides many ways for data transformation. In this tutorial we will cover a simple example of data transformation by replacing the content of one file and writing a new file as result. Data transformation in Camel is a broad term that covers two types of transformation: Data format transformation: which means that the message … Read more

Using maven to set up a Camel project

In this Camel tutorial we will learn how to set up a basic Camel project using a Maven archetype which is based on Spring XML configuration file. There are a few different approaches to configuring components and endpoints. 1. You can explicitly configure a Component using Java code as shown in this example: context.addRoutes(new RouteBuilder() … Read more

Routing JMS messages to JBoss EAP 6 using Camel

This tutorial shows how you can connect to HornetQ embedded in JBoss EAP 6 using a Camel Route. First of all, you need to create an application user on the application server. The user will be granted the guest role which by default has permission to send and consume messages on all JMS destinations, as … Read more