Examples
Once you have read about Getting Started and looked at the Enterprise Integration Patterns, you might want to try out some examples.
Before starting to work on example you may want to check the requirements for working with Camel. Then Running Examples describes how to get the examples to run
Walk-throughs
- Walk through the code of a beginner's example so you can understand how things fit together using the Java DSL to set up some routes in a simple
main(…)
method. - Walk through the Spring DSL example to look at XML-based routing.
- Walk through the Console Example to practice reading input from the console.
Notice
The examples listed below are hosted at Apache. We also offer the Articles page as a collection of 3rd-party Camel material - such as tutorials, blog posts, published articles, videos, podcasts, presentations, and so forth.
If you have written a Camel-related article, then we are happy to provide a link to it. You can contact the Camel Team via our Mailing Lists, or simply post a tweet with the words "Apache Camel".
Examples
- ActiveMQ Camel Tomcat example shows how to embed Apache ActiveMQ and Camel in a web application running on Apache Tomcat.
- Aggregate Example shows the overhauled Aggregator EIP with persistent storage, which are part of Camel 2.3.
- BAM Example shows how to use Camel as a BAM (Business Activity Monitoring) framework, to monitor your business transactions.
- Cafe Example shows how to use Camel to implement a Cafe shop use case.
- Console Example shows how to get stared with Camel using to read input from the console.
- CXF Example shows how to use Camel as the CXF services router, which consumes the request of a CXF client then passes the request to a CXF-based web service.
- CXF Example OSGi Blueprint shows how to use the camel-cxf consumer component in an OSGI environment using OSGi Blueprint with the OSGI HTTP service.
- CXF Example OSGi shows how to use the camel-cxf consumer component in an OSGI environment using Spring-DM with the OSGI HTTP service.
- CXF Proxy Example shows how to use Camel to proxy a web service using CXF.
- CXF Tomcat Example shows how to use Camel to expose a code-first web service using CXF as a web application to be deployed in Apache Tomcat.
- ETL Example shows how to use Camel as an Extract Transform Load (ETL) tool
- FTP Example shows how to use Camel to upload or download files to/from an existing FTP server.
- Guice JMS Example shows how to use Guice as the Dependency Injection framework to create some JMS base routes using just Java code and a properties file
- Hibernate Example shows how to work with Hibernate to exchange data using a shared database table.
- JMX Component Example shows how to use the camel-jmx component.
- LoadBalancing Mina Example shows how to use the Load Balancer EIP to balance communication with remote servers using Mina.
- Loan Broker Example shows how to use Camel to implement the classical EIP composed messaging sample .
- Management Example shows how to use JMX in Camel to manage a running Camel application.
- MyBatis Example shows how to work with MyBatis to exchange data using a shared database table.
- Netty HTTP Server Example shows how to use Netty HTTP as a shared HTTP server with multiple Camel applications in OSGi container such as Karaf / ServiceMix.
- POJO Messaging Example shows how to use annotations to produce, consume or route messages to Camel endpoints without using any DSL.
- Route Throttling Example shows how to use RoutePolicy and JMX in Camel to dynamically throttle routes.
- Servlet Tomcat Example shows how to use Camel to route messages using servlets running in any web container such as Apache Tomcat.
- Servlet Tomcat No Spring Example shows how to use Camel to route messages using servlets running any web container such as Apache Tomcat without using the Spring Framework.
- Simple Jira Bot shows how to use the camel-rss feed to send updates to an irc channel using camel-irc.
- Spring Example shows how to work with the Spring example using a Spring ApplicationContext to configure Camel with Java routing rules
- Spring Java Config Example shows how to use the Spring java config to configure the Camel with Java routing rules
- Spring Security Example shows how to implement a basic http authentication and role based authorization within a camel route by leverage the camel-spring-security component.
- Spring Web Services Example shows how to expose a SOAP-based web service using Camel and Spring Web Services.
- Spring XQuery Example shows how to work with the Spring example using a Spring ApplicationContext to configure Camel
- SQL Example shows how to work with SQL to exchange data using a shared database table.
- Tracer Example shows how to use Tracer in Camel to trace how Exchange is routed.
- Twitter Websocket Example demonstrates how to poll a constant feed of twitter searches and publish results in real time using web socket to a web page.
- Twitter Websocket Blueprint Example An OSGi Blueprint version of the Twitter Websocket Example.