[CONF] Apache Camel > Infinispan
Bilgin Ibryam edited the page: Infinispan ... Code Block xml messageId In c For more information, see these resources... ... View Online · Like · View Changes Stop watching space · Manage Notifications This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software
[CONF] Apache Camel > Infinispan
Bilgin Ibryam edited the page: Infinispan ... Code Block java from("direct:start") .setHeader(InfinispanConstants.OPERATION, constant(InfinispanConstants.GET)) .setHeader(InfinispanConstants.KEY, constant("123")) .to("infinispan://localhost?cacheContainer=#cacheContainer"); Using the Infinispan based idempotent repository In this section we will use the Infinispan based idempotent repository. First, we need to create a cacheManager and then configure our org.apache.camel.component.infinispan.processor.idempotent.InfinispanIdempotentRepository: Code Block xml
[CONF] Apache Camel > Idempotent Consumer
Bilgin Ibryam edited the page: Idempotent Consumer ... MemoryIdempotentRepository FileIdempotentRepository HazelcastIdempotentRepository (Available as of Camel 2.8) JdbcMessageIdRepository (Available as of Camel 2.7) JpaMessageIdRepository InfinispanIdempotentRepository (Available as of Camel 2.13.0) Options The Idempotent Consumer has the following options: ... If you have running Camel in a clustered environment, a in memory idempotent repository doesn't work (see above). You can setup either a central database or use the idempotent consumer implementation based on the Hazelcast data grid. Hazelcast finds the nodes over multicast (which is default - configure Hazelcast for tcp-ip) and creates automatically a map based repository: Code Block java HazelcastIdempotentRepository idempotentRepo = new HazelcastIdempotentRepository("myrepo"); from("direct:in").idempotentConsumer(header("messageId"), idempotentRepo).to("mock:out"); ... See this little tutorial, how setup such an idempotent repository on two cluster nodes using Apache Karaf. Available as of Camel 2.13.0 Another option for using Idempotent Consumer in a clustered environment is Infinispan. Infinispan is a data grid with replication and distribution clustering support. For additional information see camel-infinispan.
[CONF] Apache Camel > JMS
Bilgin Ibryam edited the page: JMS ... Transactional Client Bean Integration Tutorial-JmsRemoting JMSTemplate gotchas CamelJmsDestination View Online · Like · View Changes Stop watching space · Manage Notifications This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software
[CONF] Apache Camel > Load Balancer
Bilgin Ibryam edited the page: Load Balancer ... Code Block language xml MyCustomException For further examples of this pattern look at this junit test case Include Page Using This Pattern View Online · Like · View Changes Stop watching space · Manage Notifications
[CONF] Apache Camel > Camel 2.14.0 Release
Bilgin Ibryam edited the page: Camel 2.14.0 Release ... New Enterprise Integration Patterns Circuit Breaker pattern implemented as a Load Balancer policy New Components camel-ahc-ws camel-atmosphere-websocket ... View Online · Like · View Changes Stop watching space · Manage Notifications This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software
[CONF] Apache Camel > Load Balancer
Bilgin Ibryam edited the page: Load Balancer ... Code Block java from("direct:start").loadBalance() .circuitBreaker(2, 1000L, MyExceptionProcessorMyCustomException.class) .to("mock:result"); ... Code Block language xml MyExceptionProcessor...
[CONF] Apache Camel > Load Balancer
Bilgin Ibryam edited the page: Load Balancer ... The Circuit Breaker load balancer is a stateful pattern that monitors all calls for certain exceptions. Initially the Circuit Breaker is in closed state and passes all messages. If the are failures and the threshold is reached, it moves to open state and rejects all calls until halfOpenAfter timeout is reached. After this timeout is reached, if there is a new call, it will be passed pass and if the result is success the Circuit Breaker will move to closed state, or to open state if there was an error. ... Code Block language xml 1000L1000"/> MyExceptionProcessor uri="mock:result"/> MyExceptionProcessor uri="mock:result"/> The above example loads balance requests from direct:start to one of the available mock endpoint instances, in this case using a round robin policy. For further examples of this pattern look at this junit test case ... View Online · Like · View Changes Stop watching space · Manage Notifications This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software
[CONF] Apache Camel > Camel 2.13.0 Release
Bilgin Ibryam edited the page: Camel 2.13.0 Release ... camel-infinispan - to interact with Infinispan distributed data grid / cache. camel-jgroups - provides exchange of messages between Camel infrastructure and JGroups clusters. camel-optaplanner - to use OptaPlanner for problem solving plans. camel-splunk - enables you to publish and search for events in Splunk camel-swf - for managing workflows running on Amazon's Simple Wokrlof Workflow Service New Camel Maven Archetypes ... View Online · Like · View Changes Stop watching space · Manage Notifications This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software
[CONF] Apache Camel > Camel 2.13.0 Release
Bilgin Ibryam edited the page: Camel 2.13.0 Release ... camel-infinispan - to interact with Infinispan distributed data grid / cache. camel-jgroups - provides exchange of messages between Camel infrastructure and JGroups clusters. camel-optaplanner - to use OptaPlanner for problem solving plans. camel-splunk - enables you to publish and search for events in Splunk camel-swf - for managing workflows running on Amazon's Simple Wokrlof Service New Camel Maven Archetypes ... View Online · Like · View Changes Stop watching space · Manage Notifications This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software
[CONF] Apache Camel > AWS
Bilgin Ibryam edited the page: AWS ... AWS service Camel component Camel Version Component description Simple Queue Service (SQS) AWS-SQS 2.6.0 Supports sending and receiving messages using SQS Simple Notification Service (SNS) AWS-SNS 2.8.0 Supports sending messages using SNS Simple Storage Service (S3) AWS-S3 2.8.0 Supports storing and retrieving of objects using S3 Simple Email Service (SES) AWS-SES 2.8.4 Supports sending emails using SES SimpleDB AWS-SDB 2.8.4 Supports storing retrieving data to/from SDB DynamoDB AWS-DDB 2.10.0 Supports storing retrieving data to/from DDB CloudWatch AWS-CW
[CONF] Apache Camel > AWS
Bilgin Ibryam edited the page: AWS ... AWS service Camel component Camel Version Component description Simple Queue Service (SQS) AWS-SQS 2.6.0 Supports sending and receiving messages using SQS Simple Notification Service (SNS) AWS-SNS 2.8.0 Supports sending messages using SNS Simple Storage Service (S3) AWS-S3 2.8.0 Supports storing and retrieving of objects using S3 Simple Email Service (SES) AWS-SES 2.8.4 Supports sending emails using SES SimpleDB AWS-SDB 2.8.4 Supports storing retrieving data to/from SDB DynamoDB AWS-DDB 2.10.0 Supports storing retrieving data to/from DDB CloudWatch AWS-CW
[CONF] Apache Camel > Team
Team Page edited by Bilgin Ibryam Changes (1) ... | [Babak Vahdat|http://www.xing.com/profile/Babak_Vahdat] | bvahdat | [Cyberlogic Consulting GmbH|http://www.cyberlogic.ch] | | [Ben O'Day|http://www.consulting-notes.com] | boday | [Initek Consulting|http://initekconsulting.com] | | [Bilgin Ibryam |http://www.ofbizian.com] | bibryam | [BBC|http://www.bbc.co.uk/] [Red Hat|http://www.redhat.com/products/jbossenterprisemiddleware/fusesource/] | | [Bruce Snyder|http://bsnyderblog.blogspot.com/] | bsnyder | [SpringSource|http://springsource.com/] | | [Charles Moulliard|http://cmoulliard.blogspot.com] | cmoulliard | [Red Hat|http://www.redhat.com/products/jbossenterprisemiddleware/fusesource/] | ... Full Content This page lists who we are. By all means add yourself to the list - lets sort it in alphabetical order Committers Name ID Organisation Aaron Mulder ammulder Chariot Solutions Akitoshi Yoshida ay SAP Babak Vahdat bvahdat Cyberlogic Consulting GmbH Ben O'Day boday Initek Consulting Bilgin Ibryam bibryam Red Hat Bruce Snyder bsnyder SpringSource Charles Moulliard cmoulliard Red Hat Christian Mueller cmueller Atos Worldline Christian Schneider cschneider Talend Claus Ibsen davsclaus Red Hat David Jencks djencks IBM Daniel Kulp dkulp Talend Freeman Fang ffang Red Hat Gary Tully gtully Red Hat Gert Vanthienen gertv Red Hat Guillaume Nodet gnodet Red Hat Hadrian Zbarcea hadrian Talend Henryk Konsek hekonsek Pitney Bowes Hiram Chirino chirino Red Hat Ioannis Canellos iocanel Red Hat Jacek Laskowski jlaskowski Jean-Baptiste Onofré jbonofre Talend Jeff Genender jgenender Savoir Technologies Johan Edstrom joed Savoir Technologies Jonathan Anstey janstey Red Hat James Strachan jstrachan Red Hat Martin Krasser krasserm Nicky Sandhu nsandhu Raul Kripalani raulk Rich Newcomb rnewcomb Richard Kettelerij rickette Avisi BV Rob Davies rajdavies Red Hat Roman Kalukiewicz romkal Scott England-Sullivan sully6768 Red Hat Stan Lewis slewis Red Hat Tracy Snell tjsnell Juice Labs Willem Jiang ningjiang Red Hat William Tam wtam Progress Software Contributors Adding your name to the list belowIf you have been contributing to the Apache Camel project, and you want your name added to the list below. Then you can get in touch with the Camel team from the Mailing Lists and ask to be added. Name Organisation Aaron Crickenberger Al Maw Aleksi Kallio Andrew Deason Andy Depue Axel Hohaus Arjan Moraal Barry Kaplan Brett Meyer Red Hat, 3River Development Brian Diesenhaus Brian Guan Brian Madigan Bruno Barin Bruno Borges Bryan Schmidt Chris Kingsbury TradingScreen Christoph Emmersberger Christopher G. Stach II Charles Anthony Christian Posta Red Hat Christopher Köster Claus Straube Dan Checkoway Dennis Byrne Thoughtworks Erik Onnen Fernando Ribeiro Upic Gert Vanthienen Glen Klyuzner Tullib Hakan Guleryuz ASPone James Chamberlain James Zhang Jamie McCrindle Jason Anderson Jason Carreira Jason Sherman Jérôme Delagnes Jeff Sparkes Jeff Lansing SYS Technologies Jeremy Volkman Joe Fernandez TTM John Heitmann Jonathan Cook BBC Juraj Tomasov Kevin Ross Leo Pechersky Li Ma Lars Heinemann Red Hat Lauri Lehmijoki Lauri Kimmel Marco Buss product + concept Marco Luebcke Mark Bucayan Mark Timmings Mario Siegenthaler Mathieu Lalonde Mats Henricson Matt Hoffman Matthew Vincent Mathew Kuppe 360 Treasury Systems Mike Perham Mitko Kolev InterComponentWare AG Neil Clayton Royal Bank of Scotland Neil Thorne Nick Reid Evolution Niklas Gustavsson Ning Li Noah Nordrum Oliver Belikan Ozgur Cetinturk Paul Smith Paul Wai Pawel Tucholski Peter Henning Przemyslaw Budzik Radek Sedmak Reuben Garrett Robert Liguori Solentus Robin Roos Dresdner Kleinwort Wasserstein Ross Mason Sami Dalouche Sanjiv Jivan Steven Marcus Taylor Gautier Thomas Heller Trevor Pounds Xueqiang Mi Stop watching space | Change
[CONF] Apache Camel > Infinispan
Infinispan Page edited by Bilgin Ibryam Changes (1) ... {code} infinispan://hostName?[options] {code} ... Full Content Infinispan Component Available as of Camel 2.13.0 This component allows you to interact with Infinispan distributed data grid / cache. Infinispan is an extremely scalable, highly available key/value data store and data grid platform written in Java. Maven users will need to add the following dependency to their pom.xml for this component: org.apache.camel camel-infinispan x.x.x URI format infinispan://hostName?[options] URI Options The producer allows sending messages to a local infinispan cache configured in the registry, or to a remote cahe using the HotRod protocol. The consumer allows listening for events from local infinispan cache accessible from the registry. Name Default Value Type Context Description cacheContainer null CacheContainer Shared Reference to a org.infinispan.manager.CacheContainer in the Registry. cacheName null String Shared The cache name to use. If not specified, default cache is used. command PUT String Producer The operation to perform. Currently supports the following values: PUT, GET, REMOVE, CLEAR. eventTypes null Set Consumer The event types to register. By default will listen for all event types. Possible values defined in org.infinispan.notifications.cachelistener.event.Event.Type sync true Boolean Consumer By default the consumer will receive notifications synchronosly, by the same thread that process the cache operation. Message Headers Name Default Value Type Context Description CamelInfinispanCacheName null String Shared The cache participating in the operation or event. CamelInfinispanOperation PUT String Producer The operation to perform: CamelInfinispanOperationPut, CamelInfinispanOperationGet, CamelInfinispanOperationRemove, CamelInfinispanOperationClear. CamelInfinispanKey null Object Shared The key to perform the operation to or the key generating the event. CamelInfinispanValue null Object Producer The value to use for the operation. CamelInfinispanOperationResult null Object Producer The result of the operation. CamelInfinispanEventType null String Consumer The type of the received event. Possible values defined here org.infinispan.notifications.cachelistener.event.Event.Type CamelInfinispanIsPre null Boolean Consumer Infinispan fires two events for each operation: one before and one after the operation. Example Below is an example route that retrieves a value from the cahe for a specific key: from("direct:start") .setHeader(InfinispanConstants.OPERATION, constant(InfinispanConstants.GET)) .setHeader(InfinispanConstants.KEY, constant("123")) .to("infinispan://localhost?cacheContainer=#cacheContainer"); For more information, see these resources... See Also Configuring Camel Component Endpoint Getting Started Stop watching space | Change email notification preferences View Online | View Changes
[CONF] Apache Camel > Infinispan
Infinispan Page added by Bilgin Ibryam Infinispan Component Available as of Camel 2.13.0 This component allows you to interact with Infinispan distributed data grid / cache. Infinispan is an extremely scalable, highly available key/value data store and data grid platform written in Java. Maven users will need to add the following dependency to their pom.xml for this component: org.apache.camel camel-infinispan x.x.x URI format infinispan://host?[options] URI Options The producer allows sending messages to a local infinispan cache configured in the registry, or to a remote cahe using the HotRod protocol. The consumer allows listening for events from local infinispan cache accessible from the registry. Name Default Value Type Context Description cacheContainer null CacheContainer Shared Reference to a org.infinispan.manager.CacheContainer in the Registry. cacheName null String Shared The cache name to use. If not specified, default cache is used. command PUT String Producer The operation to perform. Currently supports the following values: PUT, GET, REMOVE, CLEAR. eventTypes null Set Consumer The event types to register. By default will listen for all event types. Possible values defined in org.infinispan.notifications.cachelistener.event.Event.Type sync true Boolean Consumer By default the consumer will receive notifications synchronosly, by the same thread that process the cache operation. Message Headers Name Default Value Type Context Description CamelInfinispanCacheName null String Shared The cache participating in the operation or event. CamelInfinispanOperation PUT String Producer The operation to perform: CamelInfinispanOperationPut, CamelInfinispanOperationGet, CamelInfinispanOperationRemove, CamelInfinispanOperationClear. CamelInfinispanKey null Object Shared The key to perform the operation to or the key generating the event. CamelInfinispanValue null Object Producer The value to use for the operation. CamelInfinispanOperationResult null Object Producer The result of the operation. CamelInfinispanEventType null String Consumer The type of the received event. Possible values defined here org.infinispan.notifications.cachelistener.event.Event.Type CamelInfinispanIsPre null Boolean Consumer Infinispan fires two events for each operation: one before and one after the operation. Example Below is an example route that retrieves a value from the cahe for a specific key: from("direct:start") .setHeader(InfinispanConstants.OPERATION, constant(InfinispanConstants.GET)) .setHeader(InfinispanConstants.KEY, constant("123")) .to("infinispan://localhost?cacheContainer=#cacheContainer"); For more information, see these resources... See Also Configuring Camel Component Endpoint Getting Started Stop watching space | Change email notification preferences View Online
[CONF] Apache Camel > Books
Books Page edited by Bilgin Ibryam Changes (2) ... * [Camel in Action|http://www.manning.com/ibsen] * [Instant Apache Camel Message Routing|http://www.packtpub.com/apache-camel-message-routing/book] * [Open Source ESBs in Action|http://www.manning.com/rademakers/] * [Enterprise Integration Patterns|http://www.enterpriseintegrationpatterns.com/] ... [_Camel in Action_|http://manning.com/ibsen] is a Camel tutorial full of small examples showing how to work with the integration patterns. It starts with core concepts like sending, receiving, routing, and transforming data. It then shows you the entire lifecycle and goes in depth on how to test, deal with errors, scale, deploy, and even monitor your app—details you can find only in the Camel code itself. Written by the developers of Camel, this book distills their experience and practical insights so that you can tackle integration tasks like a pro. h3. Instant Apache Camel Message Routing [Instant Apache Camel Message Routing|http://www.packtpub.com/apache-camel-message-routing/book] by [Bilgin Ibryam|http://ofbizian.com/]. Published by [Packt publishing|http://www.packtpub.com/] in August 2013. [!3477OSmall.jpg!|http://www.packtpub.com/apache-camel-message-routing/book] [_Instant Apache Camel Message Routing_|http://www.packtpub.com/apache-camel-message-routing/book] will help you to get started with Camel and Enterprise Integration Patterns in matter of hours. It is a short, focused and practical guide to Apache Camel that provides a high level overview of the Camel architecture and message routing principles. It introduces a number of integration patterns, complete with diagrams, common use cases, and examples about how to use them. The book is easy to read and ideal for developers who want to get started with Camel and message routing quickly. h3. Open Source ESBs in Action [Open Source ESBs in Action|http://www.manning.com/rademakers/] by Tijs Rademakers and Jos Dirksen. Published by [Manning|http://www.manning.com] in September 2008. ... Full Content Books This page lists the known books about Apache Camel. If you happen to know a book which is not listed then please contact us, for example using the Mailing Lists. Camel in Action Instant Apache Camel Message Routing Open Source ESBs in Action Enterprise Integration Patterns Camel in Action Camel in Action by Claus Ibsen and Jonathan Anstey. Published by Manning in December 2010. Camel in Action is a Camel tutorial full of small examples showing how to work with the integration patterns. It starts with core concepts like sending, receiving, routing, and transforming data. It then shows you the entire lifecycle and goes in depth on how to test, deal with errors, scale, deploy, and even monitor your app—details you can find only in the Camel code itself. Written by the developers of Camel, this book distills their experience and practical insights so that you can tackle integration tasks like a pro. Instant Apache Camel Message Routing Instant Apache Camel Message Routing by Bilgin Ibryam. Published by Packt publishing in August 2013. Instant Apache Camel Message Routing will help you to get started with Camel and Enterprise Integration Patterns in matter of hours. It is a short, focused and practical guide to Apache Camel that provides a high level overview of the Camel architecture and message routing principles. It introduces a number of integration patterns, complete with diagrams, common use cases, and examples about how to use them. The book is easy to read and ideal for developers who want to get started with Camel and message routing quickly. Open Source ESBs in Action Open Source ESBs in Action by Tijs Rademakers and Jos Dirksen. Published by Manning in September 2008. Open-Source ESBs in Action describes how to use ESBs in real-world situations. You will learn how the various features of an ESB such as transformation, routing, security, connectivity, and more can be implemented on the example of two open-source ESB implementations: Mule and ServiceMix. The authors first introduce ServiceMix and Mule, and then present general principles and patterns of ESB use, as well as a structured approach to solving common integration problems, through examples using them. Enterprise Integration Patterns Enterprise Integration Patterns by Gregor Hohpe and Bobby Woolf. Published by Addison Wesley in October 2003. This is known as the EIP book which distills 65 EIP patterns, which Apache Camel implements. If you want to learn the EIP patterns better then this is a great book. This book provides a consistent vocabulary and visual notation framework to descri
[CONF] Apache Camel > Books
Books File attached by Bilgin Ibryam 3477OSmall.jpg (44 kB image/jpeg) Stop watching space | Change email notification preferences View Attachments
[CONF] Apache Camel > Books
Books File attached by Bilgin Ibryam 3477OS.jpg (26 kB image/jpeg) Stop watching space | Change email notification preferences View Attachments
[CONF] Apache Camel > AWS-CW
AWS-CW Page edited by Bilgin Ibryam Changes (1) ... | {{CamelAwsCwMetricNamespace}} | {{String}} | The Amazon CW metric namespace. | | {{CamelAwsCwMetricTimestamp}} | {{Date}} | The Amazon CW metric timestamp. | | {{CamelAwsCwMetricDimensionName}} | {{String}} | *Camel 2.12:* The Amazon CW metric dimension name. | | {{CamelAwsCwMetricDimensionValue}} | {{String}} | *Camel 2.12:* The Amazon CW metric dimension value. | | {{CamelAwsCwMetricDimensions}} | {{Map}} | *Camel 2.12:* A map of dimension names and dimension values. | {div} ... Full Content CW Component *Available as of Camel 2.11 The CW component allows messages to be sent to an Amazon CloudWatch metrics. The implementation of the Amazon API is provided by the AWS SDK. PrerequisitesYou must have a valid Amazon Web Services developer account, and be signed up to use Amazon CloudWatch. More information are available at Amazon CloudWatch. URI Format aws-cw://namespace[?options] The metrics will be created if they don't already exists. You can append query options to the URI in the following format, ?options=value&option2=value&... URI Options Name Default Value Context Description amazonCwClient null Producer Reference to a com.amazonaws.services.cloudwatch.AmazonCloudWatch in the Registry. accessKey null Producer Amazon AWS Access Key secretKey null Producer Amazon AWS Secret Key name null Producer The metric name which is used if the message header 'CamelAwsCwMetricName' is not present. value 1.0 Producer The metric value which is used if the message header 'CamelAwsCwMetricValue' is not present. unit Count Producer The metric unit which is used if the message header 'CamelAwsCwMetricUnit' is not present. namespace null Producer The metric namespace which is used if the message header 'CamelAwsCwMetricNamespace' is not present. timestamp null Producer The metric timestamp which is used if the message header 'CamelAwsCwMetricTimestamp' is not present. amazonCwEndpoint null Producer The region with which the AWS-CW client wants to work with. Required CW component optionsYou have to provide the amazonCwClient in the Registry or your accessKey and secretKey to access the Amazon's CloudWatch. Usage Message headers evaluated by the CW producer Header Type Description CamelAwsCwMetricName String The Amazon CW metric name. CamelAwsCwMetricValue Double The Amazon CW metric value. CamelAwsCwMetricUnit String The Amazon CW metric unit. CamelAwsCwMetricNamespace String The Amazon CW metric namespace. CamelAwsCwMetricTimestamp Date The Amazon CW metric timestamp. CamelAwsCwMetricDimensionName String Camel 2.12: The Amazon CW metric dimension name. CamelAwsCwMetricDimensionValue String Camel 2.12: The Amazon CW metric dimension value. CamelAwsCwMetricDimensions Map Camel 2.12: A map of dimension names and dimension values. Advanced AmazonCloudWatch configuration If you need more control over the AmazonCloudWatch instance configuration you can create your own instance and refer to it from the URI: from("direct:start") .to("aws-cw://namepsace?amazonCwClient=#client"); The #client refers to a AmazonCloudWatch in the Registry. For example if your Camel Application is running behind a firewall: AWSCredentials awsCredentials = new BasicAWSCredentials("myAccessKey", "mySecretKey"); ClientConfiguration clientConfiguration = new ClientConfiguration(); clientConfiguration.setProxyHost("http://myProxyHost"); clientConfiguration.setProxyPort(8080); AmazonCloudWatch client = new AmazonCloudWatchClient(awsCredentials, clientConfiguration); registry.bind("client", client); Dependencies Maven users will need to add the following dependency to their pom.xml. pom.xml org.apache.camel camel-aws ${camel-version} where ${camel-version} must be replaced by the actual version of Camel (2.10 or higher). See Also Configuring Camel Component Endpoint Getting Started AWS Component Stop watching space | Change email notification preferences View Online | View Changes | Add Comment
[CONF] Apache Camel > Try Catch Finally
Try Catch Finally Page edited by Bilgin Ibryam Changes (1) ... A third feature is that you can attach a {{onWhen}} predicate to signal if the catch should trigger or not at runtime. And to simulate _rethrowing_ an exception from a {{doCatch}} you should use the {{handled}} predicate. If its evaluated to {{false}} Camel will reattach the exception on the [Exchange]. h3. Using try .. catch .. finally in Java DSL ... Full Content Try ... Catch ... Finally Camel supports the Java equivalent of try .. catch and finally directly in the DSL. It aims to work like its Java sisters but with more power. Especially in Camel 2.0 where we gave this feature an overhaul. In Camel we prefix the keywords with do to avoid having same keyword as Java. So we have: doTry doCatch doFinally end to end the block in Java DSL Notice this document is based on how it works in Camel 2.0. In Camel 1.x this feature isn't as powerful and it uses a slight different keyword names. Camel error handling is disabledWhen using doTry .. doCatch .. doFinally then the regular Camel Error Handler does not apply. That means any onException or the likes does not trigger. The reason is that doTry .. doCatch .. doFinally is in fact its own error handler and that it aims to mimic and work like how try/catch/finally works in Java. About doCatch and its power over Java The doCatch in Camel is empowered over its Java sister. First of all you can define multiple exceptions to catch in a single block. And second of all an important aspect over the regular Java counter parts is that Camel will check in the exception hierarchy when it matches a thrown exception against the doCatch blocks. The reasons is that many times the original caused exceptions is wrapped by other wrapper exceptions, typically transposing the exception from a checked to a runtime exception. Camel for instance does this by wrapped it in a CamelRuntimeException. So if the original caused exception is an java.io.IOException then Camel will still match a doCatch block defined with an java.io.IOException. And just like Java the order in which you have multiple doCatch blocks matter. Camel will iterate from the top going down and use the first doCatch that matches the exception. The reason is to keep it similar to the regular java and how it selects a catch block. This differers from the Exception Clause that has a more intelligent exception selection strategy among multiple onException definitions, where it also consider the delta in the exception hierarchy to select the best definition. A third feature is that you can attach a onWhen predicate to signal if the catch should trigger or not at runtime. And to simulate rethrowing an exception from a doCatch you should use the handled predicate. If its evaluated to false Camel will reattach the exception on the Exchange. Using try .. catch .. finally in Java DSL In the route below we have all keywords in action. As the code is based on a unit test we route using Mock. Unknown macro: {code} from("direct:start") .doTry() .process(new ProcessorFail()) .to("mock:result") .doCatch(IOException.class, IllegalStateException.class) .to("mock:catch") .doFinally() .to("mock:finally") .end(); And in the route below we want to indicate if an IOException occured we want to route it elsewhere and at the same time keep the exception so the original caller is notified about this exception. To do this we need to not rethrow the exception and this is why we use handled and set it to false to indicate, no we did not handle it so please keep the exception. The 2nd exception block can be omitted but as the code is based on an unit test we want to test the behavior non IOException as well. Unknown macro: {code} from("direct:start") // here is our try where we try processing the exchange in the route below if it fails // we can catch it below, just like regular try .. catch .. finally in Java .doTry() .process(new ProcessorFail()) .to("mock:result") // catch IOExcption that we do not want to handle, eg the caller should get the error back .doCatch(IOException.class) // mark this as NOT handled, eg the caller will also get the exception .handled(false) .to("mock:io") .doCatch(Exception.class) // and catch all other exceptions // they are handled by default (ie handled = true) .to("mock:error") // here the try block ends .end(); And finally we have an example of the onWhen predicate in action. We can attach it to a doCatch block and at runtime determine if the block should be triggered or not. In our case we only want to trigger if the caus