6.6. Miscellaneous Changes


DefaultTimeoutMap class

Since Apache Camel version 2.13.0, you must call the start method on the org.apache.camel.support.DefaultTimeoutMap<K,V> class to initialize the map before use.

@ExcludeRoutes annotation

Since Apache Camel version 2.13.0, the @ExcludeRoutes test annotation now accepts only classes implementing the RoutesBuilder interface.

MBean naming

Since Apache Camel version 2.13.0, the MBean names registered by Camel JMX no longer include the hostname in the context part. For example, in previous versions the context name would have the format, context=myHost/myCamelId, whereas now it has the format, context=myCamelId. Having the hostname in the MBean name makes things more complicated, because the MBean name changes depending on the host. The option, includeHostName, can be set to true in order to restore the old behaviour.
Since Apache Camel version 2.13.0, MBean naming in OSGi has been cleaned up to use simpler naming, with the MBean name now set to the OSGi symbolicName by default. In previous versions, it was possible for MBean names to have repeated bundle IDs—for example, context=114-114-camel-6.

jmxAgent element

Since Apache Camel version 2.13.0, the default value of the jmxAgent element's createConnector attribute has changed from true to false.
Since Apache Camel version 2.13.0, JMX Load statistics have been disabled by default. You can now explicitly enable statistics by setting loadStatisticsEnabled=true on the jmxAgent element.

onException Java DSL command

Since Apache Camel version 2.13.0, when using the onException.backOffMultiplier or collisionAvoidancePercent or collisionAvoidanceFactor options, back-off or collision avoidance is automatically enabled. In previous versions, it was also necessary to call useExponentialBackOff or useCollisionAvoidance as well. The errorHandler DSL command has the same behaviour.

Spring XML shutting down beans

Since Apache Camel version 2.13.0, the camelContext bean will, by default, shut down before all other beans in Spring XML. This ensures a cleaner shutdown of the Camel context. If you prefer to revert to the old behaviour, you can set the new camelContext attribute, shutdownEager, to false.

onCompletion DSL command

Since Apache Camel version 2.14, now runs without a thread pool by default. To restore the old behaviour, set the paralllelProcessing option to true.

startAllRoutes method

Since Apache Camel version 2.14, setting autoStartup to false, and starting a CamelContext for the second time does not start the routes. Instead use the new startAllRoutes method on CamelContext to start all the routes.

Unit testing with Spring

Since Apache Camel version 2.15, unit testing with Spring 3.x now requires the camel-test-spring3 component. The camel-test-spring40 component is for testing with Spring 4.0.x and the camel-test-spring component is for testing with Spring 4.1.

Jetty 7.x

Since Apache Camel version 2.15, Jetty 7 has been dropped and is no longer supported.

Simple language and properties syntax

Since Apache Camel version 2.15, the property placeholder syntax has changed. It is now possible to specify a default value, using the syntax ${properties:Key:DefaultVal}. Also, the syntax for overriding the properties file location has been changed from ${properties:Location:Key} to ${properties-location:Location:Key} (to avoid clashing with the new syntax for specifying default values).

Karaf camel:backlog-tracer-* commands

Since Apache Camel version 2.15, the Karaf console commands for the Camel backlog tracer (backlog-tracer-dump, backlog-tracer-info, backlog-tracer-start, backlog-tracer-stop) have been removed, because they are not suitable for a command-line environment.

InflightRepository interface

Since Apache Camel version 2.15, the org.apache.camel.spi.InflightRepository interface now includes additional methods for browsing in-flight exchanges.

exchangePattern URI option

Since Apache Camel version 2.15, when using the to DSL command or the recipientList DSL command, the exchange pattern specified by adding ?exchangePattern=Pattern to the endpoint URI now takes precedence as the pattern that is used for invoking the endpoint.

Default class loader in CamelContext

Since Apache Camel version 2.15, the class loader, DefaultClassLoader, now falls back to use the application context classloader that may have been set on CamelContext to better be able to load classes/resources from the classpath in different runtime environments.

Removing a route

Since Apache Camel version 2.15, removing a route now also remove its static endpoints from the EndpointRegistry (if those endpoints are not shared and used by other routes). Note, however, that any dynamic endpoints created as a result of using dynamic Enterprise Integration Patterns such as recipient list, routing slip, dynamic router or similar, are not removed from the EndpointRegistry when the route is removed.

Model classes

Since Apache Camel version 2.15, all boolean isProperty methods on the model classes have been removed, in order to ensure the model has consistent Java bean getter/setter style, with exactly one getter and one setter of each type.

Stream caching

Since Apache Camel version 2.15, added the copy method to StreamCache API for stream caching

@UriEndpoint annotation

Since Apache Camel version 2.15, if you use the @UriEndpoint annotation when implementing a custom Camel component, you must now also specify the syntax attribute to document the URI syntax of the endpoint.

ScalaRouteBuilder class

Since Apache Camel version 2.15, Scala developers should use the ScalaRouteBuilder class instead of the RouteBuilder class.

Exchange property language

The exchange property language has been renamed from property to exchangeProperty, in order to avoid ambiguity and confusion with properties as a general term.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.