Camel 2.21.0 Release
New and Noteworthy
Welcome to the 2.21.0 release which resolved 400 issues including new features, improvements and bug fixes.
- Upgraded to JAXB 2.3.0 which is more JDK9 compliant.
- Added better support for
javax.jms.StreamMessage
types in JMS component. - Optimised JMS to support ActiveMQ Artemis large messages so you can send and receive big messages such as GB's in size. There is an example demonstrating this in camel-example-artemis-large-messages.
- Added support for route coverage reports which allows 3rd party tooling via SPI to visualise route coverage to Camel developers.
- Added route-coverage goal to the Camel Maven Plugin so you can report route coverage from Maven command line.
- Added support for doing manual commits via Java code when using Kafka consumer.
- Vendor extensions in the swagger generated API docs is now disabled turned off, when using Rest DSL (not all 3rd party API gateways/tooling support vendor extensions). You can turn this back-on via the apiVendorExtension option.
- The SFTP consumer now also supports the
useList
option which can be used to download a single known file without use LIST operation on the FTP server (which can be slow if the FTP server has many files in the LIST results) - Camel JSON with camel-jackson will now automatic use shared ObjectMapper instance if there is only one instance in the Registry. For example users with Spring Boot then allows Camel to easily use the default mapper from Spring Boot.
- Added
ExtendedStartupListener
that allows a callback just after the CamelContext has been fully started. - You can now specify examples in the Rest DSL that are included in the generated Swagger api-doc via camel-swagger-java.
- Improved file/ftp consumer to use current thread to poll, instead of a scheduled background task, when using pollEnrich (Content Enricher).
- Direct component now blocks by default if sending to a consumer which is not yet ready, which may happen during startup (little window of opportunity). This avoids
DirectConsumerNotAvailableException
being thrown during startup etc. - The FTP component can now log progress (turn on transferLoggingLevel) when perfomring download/upload and other operations. You can also find this information for the consumer in JMX.
- Added support for resuming downloads to FTP component. For example if you download big files and has connection problems with the FTP server. Then later when the connectivity works again, Camel can resume download the in-progress file.
- The Jetty and SERVLET consumers will now return HTTP Status 405 (method not allowed) for requests that would have been processed by another HTTP request method, for example calling REST services with the wrong method. Beforehand a 404 error code was always regardless.
- Reworked the
FileIdempotentRepository
so the internal in-memory cache is only used for quick lookup of the most frequent file names, and lookup from disk as well. See more details in the class javadoc of the file. - The SQL Stored Procedure component now supports INOUT parameters.
- Added restart action to ControlBus Component so you can easier restart a route.
- camel-spring-boot actuator endpoints for routes is now in read-only mode by default.
- Added option to Aggregate EIP so make it easier to complete all previous groups on new incoming correlation key, and as well to force completion from Java code logic in the
AggregationStrategy
implementation. - Using AdviceWith for unit testing now logs the routes before vs after in XML format so its easier to spot the change route models.
- Added support for using SpEL in non-spring runtimes (however there may be functionality that SpEL may only be able to perform if using a Spring runtime).
- Made it easier to configure timeout options on HTTP4 component.
- Improvements to RabbitMQ component so for example its easier to route between RabbitMQ exchagnes without having to remove headers or turn on bridgeEndpoint option. Also reduced the logging noise that occurred at INFO level.
- You can now configure many of the RabbitMQ options on the component level instead of having to repeat them on each endpoint.
- The Bean language can now refer to method name via the double colon syntax, eg
.to("bean:myBean::myMethod")
The following issues has been fixed
- Fixed afterApplicationStart callback on camel-spring-boot to be called later and after CamelContext has been fully started.
- Fixed an issue testing with @UseAdviceWith and Camel on Spring Boot.
- Fixed OnCompletion would not be triggered from a route using Splitter and an exception was thrown during splitting.
- Fixed Kafka consumer stops consuming messages when exception occurs during offset commit.
- Fixed Netty4 consumer to stop taking in new requests while being shutdown, as otherwise it cannot graceful shutdown if new requests come in faster than it can process existing in-flight messages.
- Fixed an issue with Routing Slip and Dynamic Router when using context scoped error handler, could cause the error handler to become stopped.
- Fixed Rest DSL with Jetty security via custom define security handler and turned on api-doc as well would not startup Jetty server due missing NoLoginService error.
- Fixed Blueprint error: "name is already instanciated as null and cannot be removed"
- camel-aws - KMS component for managing Amazon KMS
- camel-aws - MQ component for working with Amazon MQ
- camel-elasticsearch-rest - The elasticsearch component is used for interfacing with ElasticSearch server using 5.x REST API.
- camel-yql - The YQL (Yahoo! Query Language) platform enables you to query, filter, and combine data across the web.
- camel-xhcange - The camel-xchange component provide access to many bitcoin and altcoin exchanges for trading and accessing market data.
- camel-wordpres - To integrate Camel with Wordpres
API breaking
- All the AwsEndpoint uri options have been removed: since we are now using AWS client builders, the way we were using the endpoint cannot be used anymore, since clients are immutable now. If you still need to set an AWS endpoint on your client, you can create your client instance and put it in the Camel registry.
- Minor API changes to
org.apache.camel.component.file.GenericFileOperations
- Minor API changes to
org.apache.camel.http.common.ServletResolveConsumerStrategy
Known Issues
Important changes to consider when upgrading
- Jetty has been upgraded to 9.4 by default, and camel-jetty is requring version 9.3 or 9.4 to run in OSGi.
- Direct component now blocks by default if sending to a consumer which is not yet ready, which may happen during startup (little window of opportunity). This avoids
DirectConsumerNotAvailableException
being thrown during startup etc. The old beavhaior can be turned on by setting block=false
on the direct component level, or on endpoints where needed. - When using
camel-saxon
then the SaxonXpathFactory class is created in the recommended way from Saxon. It will fallback and create the factory the old way if not possible. - The
camel-json-validator
component has switched from using Everit to NetworkNT JSon Schema validator library, as the former had ASF license implications and would not be allowed in future Camel releases. The NetworkNT supports v4 draft of JSon Schema as validation so make sure to use that draft version in your schemas. - Reworked the
FileIdempotentRepository
so the internal in-memory cache is only used for quick lookup of the most frequent file names, and lookup from disk as well. See more details in the class javadoc of the file. - The Karaf commands for routes is changed so the arguments for the camel context is first, and the route id is the 2nd argument. This allows the route completer to use the selected camel context name to only show route ids from that camel context, as otherwise it shows all the routes for every Camel application running in Karaf.
- camel-spring-boot actuator endpoints for routes is now in read-only mode by default. This means operations to start,stop,suspend,resume routes is forbidden. You can turn off read-only mode by setting the spring boot configuration
endpoints.camelroutes.read-only = false
Getting the Distributions
Binary Distributions
Source Distributions
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:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>2.21.0</version>
</dependency>
Git Tag Checkout
git clone https://git-wip-us.apache.org/repos/asf/camel.git
cd camel
git checkout camel-2.21.0
Changelog
For a more detailed view of new features and bug fixes, see the: