Skip to content

steinkvarud/CamelExamples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Apache Camel Examples

This is a set of examples for Apache Camel

Setup

The examples are created using Spring 3.1.1, Apache Camel 2.9.1 and Apache Acitve MQ 5.4.3 All dependencies are configured in the Maven pom.

Configure Camel

To enable Camel in Spring add the following to your spring configuration to enable Camel to read BuilderRoute objects during Spring component scan.

<camelContext id="camel">
  <contextScan/>
</camelContext>

<context:component-scan base-package="no.kvarud.camel.examples.fruitsorter.routes"/>

Configure ActiveMq

A very basic ActiveMQ configuration is set by adding a connection factory with a broker url to an embedded broker.

<amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost"/>

Add the Camel activemq component

<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent" p:connectionFactory-ref="jmsFactory"/>

Example index

FruitSorter

This is an example of a content based message router. It is located in the no.kvarud.camel.examples.fruitsorter package

To run the example

mvn exec:java -Dexec.mainClass="no.kvarud.camel.examples.fruitsorter.FruitSorterRunner"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages