Camel 2.1.0 release
New and Noteworthy
Welcome to the 2.1.0 release which approx 303 issues resolved (new features, improvements and bug fixes such as...)
- Pluggable API for Management allowing 3rd party to manage Camel.
org.apache.camel.spi.ManagementStrategyto plugin 3rd party adapter
- Fine grained events notifications is now being emitted using
- Events being fired can be created using a pluggable factory using
- Camel now supports using multiple
org.apache.camel.spi.LifecycleStrategystrategies, that also allows 3rd party to more easily integrate into Camel.
- Overhaul of default JMX management in Camel to be much improved with more attributes, mbeans, operations, statistics, and route timing working as well.
- And yes you can now start/stop routes and individual consumers and producers
- And some special processors such as Delayer and Throttler can be managed to change their delay/throttle values
- You can dynamic manage tracing even for already running applications
- Error handling in Camel is now also manageable so you for example can change the redelivery policies.
- JMS consumers being restarted will pickup any configuration changes on JMS endpoints such as changing
concurrentConsumers. And yes its fully managed using JMX.
- Number of inflight exchanges per consumer, route and totally per camel context.
- And much more...
- Improved IRC, XMPP, MINA, CXF and FreeMarker components with much thanks to the Camel community
- Added classLoader set and get method in the CamelContext to make Camel work better in the Container.
- Introduced camel-spring-osgi bundle which is merged from camel-spring and camel-osgi bundle to avoid the issue of installing upper bundles in a wrong order.
- Now Camel Karaf features are validated with the Karaf plugin.
- camel-cxf beans component supports JAXWS beans.
- camel-cxf MTOM attachment supports in Payload mode.
- Fixed the Null message will cause camel converter stop working issue.
- camel-cxf endpoint no longer requires the "serviceClass" option or Service Endpoint Interface (SEI) in Payload mode. It means only WSDL is needed but the intended port and service name in the WSDL must be provided for the camel-cxf endpoint.
- Velocity component supports to take the Velocity configuration by using propertiesFile option.
- Splitter and Multicast EIP patterns now support the option
stopOnExceptionto stop continue processing at first exception occurred. See their documentation for more details.
- Error handlers is restricted to be configured on camel context and/or routes only.
- Camel is now more robust and fault tolerant when shutting down.
- Fixed a race condition when shutting down Camel with JMS consumers that under some circumstances caused it to appear to hang
- Added pluggable
org.apache.camel.spi.InflightRepositorywith a basic implementation that can help with graceful shutdown as you can now see how many exchanges are currently in progress.
- JmsEndpoint is now singleton
- Individual routes can be pre configured to not auto startup when Camel starts:
autoStartup=falsein XML DSL and
noAutoStartup()in Java DSL.
- Camel is more robust on startup as route inputs are deferred to be started at the very end, ensuring all routes services have been pre started and thus ready when consumers is started.
- Improved unit test coverage, now having more than 4200 unit tests in total.
ConsumerTemplatenot working when it was dependency injected with
@EndpointInjectedin a Bean.
- Using IBM special JMS headers now work when sending messages to IBM WebSphere MQ. IBM special headers uses this prefix:
JMS_IBM_. In fact it works with any
- The ordering of which routes should be started can now be configured by the
startupOrderattribute which defines a number. Lowest number is started first.
autoStartupis also supported on CamelContext itself where it replaces the
shouldStartContextoption, which have been removed.
- Camel now checks on startup if multiple routes uses the same endpoint as inputs, if so it fails to start. This prevents starting Camel if you have routes with e.g. copy/paste typos. Only JMS and MINA support multiple routes to consume from same endpoint. The
MultipeConsumersSupportinterface can be optionally implemented by the endpoint to control this behavior.
- The File component handles renaming and deleting files on Windows better as Windows could block files. Also Antivirus software could causes files to be blocked.
- Fixed issues using
tempPrefixoption with the File in case of clashes with existing files. The same goes for the
localWorkDirectoryoption on the FTP component which could have a similar issue.
- Optimized XPath to allow thread safe concurrency which greatly reduces contention.
- Camel works better with Google App Engine
- The Bean component is better at choosing the best method. If given a method name it will only pick among methods with such a name.
- The Bean component is now also more strict as it must be able to convert to all the parameter types. Was to lenient before by passing in
nullinstead, when conversion was not successful.
- The Bean component now works with Spring @Transactional annotations where it uses CGLIB enhanced classes.
- Fixed an issue with setting global error handling in Spring XML not always working
- Camel adds properties to Exchange when sending to endpoints. This is useable with Dead Letter Channel where we can use this to know which Endpoint failed.
- Improved file operations on Windows platform to retry in case of issues.
- Fixed issue with
replyTooption on JMS consumers which wasn't working.
- Fixed issue with using <camel:proxy> not working
<camel:proxy>so its easier to work with out of the box. It leverages Camels type converter mechanism to adapt to the interface. Also proxied methods with a single parameter turns that parameter value into the message body.
- Added document for using Camel proxy.
pollEnrichwith reference lookup of endpoints and aggregation strategy.
<rollback>to only mark the Exchange for rollback. This allows you to set a custom reply message. Previously a
RollbackExchangeExceptionwas always set which causes Camel to thrown an exception to the client. This also works with
transactedroutes as well.
- Camel now logs on shutdown whether there was in flight exchanges or not. All together we are getting closer to having graceful shutdown supported in Camel.
@Beanis now easier to use at you define
methodinstead of one combined value.
routeIdin the Java DSL to set the id of the route. Prefer to use this over
- Introduced RoutePolicy allowing to automatic and dynamically controlling routes at runtime.
ThrottlingRoutePolicyout of the box for dynamic throttling route consumers using metrics based on the current number of inflight exchanges.
- Data Format is now resolved just as Components and Languages by looking for magic file under
- The HTTP component now also supports using NTLM authentication
- Exception Clause improved to better select the best
onExceptionto use. Now a direct match will always be used in case one existed anywhere in the caused exception hierarchy. This avoid Camel eagerly selecting a too generic such as
onException(Exception.class)when a direct match existed.
- FTP can now have its
FTPClientConfigconfigured using URI parameters. Can for example be used to set a timeout on the
- FTP is now more robust when writing files where it will reconnect the connect in case of problems.
- Added support in camel-core for non blocking Request Reply using ToAsync.
- Jetty HTTP producer supports non blocking Request Reply. See more at ToAsync and the HTTP Async Example.
HttpOperationFailedExceptionnow uses pure Java types so it can safely be transported over network without being dependent on 3rd part .jars.
- Improvements to Tracer to let it be more fine grained when used with Aggregator, Splitter etc. who has sub routes. It now also outputs correct doTry .. doCatch .. doFinally and onException etc.
RouteDefinitionwhich allows you to advice any existing route with a route builder where you can define interceptors etc. This is useable for testing so you can write tests based on existing routes and advice them with interceptors so you can detour messages and simulate errors etc.
- Timer and Quartz now logs Exchanges that failed with an exception at ERROR level to help identify the problem.
- Google App Engine supported excellent work by our new committer Martin Krasser.
- Improved CXF producer in
POJOmode to use the POJO body without having to wrap it in a
java.util.Listwhich allows for easier usage. See for example the CXF Async Example.
- Added option
testConnectionOnStartupto JMS to test connection on startup. The goal is to ensures that when Camel is started all the JMS consumers have a valid connection to the JMS broker. However if a connection cannot be established then Camel throws an exception on startup.
- Dead Letter Channel is validating its
deadLetterUrion startup to prevent failing at runtime.
- Failing to create routes is now reported with a more precise error message which pinpoints which route and what part of the route is causing the problem.
- Fixed issue with transacted routes mixed with Camel error handling doing redelivery from the beginning of the route and not only at the failed node in the route path.
- Fixed issue with using BAM with Hibernate.
- Options to the
java.sql.Statementcan be set from the URI in the JDBC component. Can be used to set maxRows etc.
- Added documentation for NMR and Quickfix.
- Fixed issues with Mail and having multiple endpoints defined with different recipients could cause Camel to use the recipients from the last defined endpoint only.
- Improved Mail to better recover from network failure on subsequent polls
- Improved Tracer to output route id
- Fixed a potential 2gb file copy limit using NIO when doing from("file:xxx").XXXX.to("file:yyy") routing.
- Upgraded and fixed EL to work with OSGi containers.
- Sampling A sampling throttler allowing you to extract a sample of exchanges from the traffic through a route.
New Data Formats
- Camel-bindy Bindy includes important new features like :
- Required (@DataField) to check mandatory field
- Position (@DataField and @KeyValuePairField) when the CSV/FIX message to be generate contain fields which are placed at a different position then those used to parse it
- Section which allow to define the class containing by example the header, body or footer section
- OneToMany which allow to Read a FIX message containing repetitive groups (= group of tags/keys) and Generate a CSV with repetitive data
In the Java DSL the
.errorHandler is now restricted to be configured on camel context and/or routes only. That means for configuring on routes you have to set it directly after the
In Spring DSL the
errorHandlerRef attribute is now only visible on the
<route> XML tags.
New .jar dependencies
camel-core now depends on commons-management.jar to facilitate the new overhauled management.
This project is hosted at FuseForge
This .jar can be retrieved from the maven central repo at: http://repo1.maven.org/maven2/org/fusesource/commonman/commons-management/1.0/
The maven dependency details are:
Data formats is now resolved just as components and languages etc. making it consistent. If you have your own custom data formats you need to create the magic file under
META-INF/services/org/apache/camel/dataformat which is a file with the data format name. See for example
camel-jackson for an example how to do that.
HttpOperationFailedException has been changed.
CamelContext have renamed the method
getLifecycleStrategies and now returns a List.
The exchange id has been changed to use the
java.util.UUID instead. This allows Camel to run on Google App Engine.
The API in
org.apache.camel.spi.ManagementNamingStrategy had its methods renaming and method signature adjusted to accommodate the big theme for Camel which was overhaul of management (JMX).
TraceableUnitOfWork has been renamed to
TracedRouteNote which is accessible from
deadLetterUri uri now only accepts a single endpoint which is prechecked on startup. You cannot any longer using multiple endpoints separated by comma. That was in fact an internal hidden feature because a recipient list was used beforehand to produce to the dead letter queue. Adding the precheck removed the recipient list. You can use Direct and route to a route which can then use a recipient list in case you really need this.
org.apache.camel.processor.CompositeProcessorwas never used
org.apache.camel.impl.ProducerTemplateProcessorwas never used
org.apache.camel.impl.NoPolicywas never used
org.apache.camel.spring.handler.LazyLoadingBeanDefinitionParserwas never used
org.apache.camel.spring.handler.ScriptDefinitionParserwas never used
org.apache.camel.spring.remoting.SendBeforeInterceptorwas never used
org.apache.camel.spring.spi.SpringConverterswas never used
org.apache.camel.PollingConsumerPollStrategyis moved to
org.apache.camel.impl.scan.PatternBasedPackageScanFilteris moved to
org.apache.camel.spring.PatternBasedPackageScanFilterin the camel-spring jar.
getSingletonEndpointsmethod have been removed from various classes in the
Removed in Spring XML
shouldStartContext on <camelContext> have been removed. Its replaced with
autoStartup which you can read more about here Configuring route startup ordering and autostartup.
@Bean now uses a
ref attribute to refer to the bean name. Also added a new
method attribute to set the method to use (optional).
You need to upgrade your code to use these attributes as the default
value have been removed. We assume only a very few people knew and uses this @Bean annotation.
allowMultipleConsumers has been removed as it did not make sense to have concurrent consumers on a direct endpoint.
Using <transacted/> in Spring XML does not work properly when using route scoped <onException> and/or <onCompletion>. Using context scoped works. And the Java DSL does not have this flaw. See CAMEL-2336.
See known issues from previous releases.
Important changes to consider when upgrading
Getting the Distributions
PGP Signature file of download
PGP Signature file of download
Source for Windows
Getting the Binaries using Maven 2
To use this release in your maven project, the proper dependency configuration that you should use in your Maven POM is:
SVN Tag Checkout
For a more detailed view of new features and bug fixes, see: