You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/08/31 11:55:31 UTC

[camel-website] branch whatsnew35 created (now 5dfe37e)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch whatsnew35
in repository https://gitbox.apache.org/repos/asf/camel-website.git.


      at 5dfe37e  Adding blog about whats new in Camel 3.5 WIP

This branch includes the following new commits:

     new 5dfe37e  Adding blog about whats new in Camel 3.5 WIP

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[camel-website] 01/01: Adding blog about whats new in Camel 3.5 WIP

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch whatsnew35
in repository https://gitbox.apache.org/repos/asf/camel-website.git

commit 5dfe37e1f0859f3bfd60b987f92667dba213639f
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Aug 31 13:10:31 2020 +0200

    Adding blog about whats new in Camel 3.5 WIP
---
 content/blog/2020/09/Camel35-Whatsnew/featured.png | Bin 0 -> 3975989 bytes
 content/blog/2020/09/Camel35-Whatsnew/index.md     | 142 +++++++++++++++++++++
 2 files changed, 142 insertions(+)

diff --git a/content/blog/2020/09/Camel35-Whatsnew/featured.png b/content/blog/2020/09/Camel35-Whatsnew/featured.png
new file mode 100644
index 0000000..e5077f5
Binary files /dev/null and b/content/blog/2020/09/Camel35-Whatsnew/featured.png differ
diff --git a/content/blog/2020/09/Camel35-Whatsnew/index.md b/content/blog/2020/09/Camel35-Whatsnew/index.md
new file mode 100644
index 0000000..c89f196
--- /dev/null
+++ b/content/blog/2020/09/Camel35-Whatsnew/index.md
@@ -0,0 +1,142 @@
+---
+title: "Apache Camel 3.5 What's New"
+date: 2020-09-04
+authors: [oscerd, davsclaus]
+categories: ["Releases"]
+preview: Details of what we have done in the Camel 3.5 release.
+---
+
+Apache Camel 3.5 has just been released.
+
+This is a non-LTS release which means we will not provide patch releases, but use the release _as-is_.
+The next planned LTS release is 3.7 scheduled towards end of the year.
+
+
+### So whats in this release?
+
+This release introduces new set of features and noticeable improvements that will we cover in this blog post.
+
+#### JUnit 5
+
+We have finished migrating all the unit tests of Camel itself to JUnit 5. Support for JUnit 4 is still present
+but will eventually be deprecated and removed in the future (when JUnit 5 is widespread adopted).
+
+The Camel test modules that support JUnit 5 has conveniently -junit5 in their JAR name.
+
+We have also refactored the `camel-test-spring-junit5` for Spring Boot users with a new `@CamelSpringBootTest` annotation
+that you mark on your unit test class instead of using JUnit 4.x `@RunWith`.
+
+See the `camel-spring-boot-example` for an example, or the Camel 3.5 upgrade guide.
+TODO: links
+
+
+#### LambdaRouteBuilder
+
+We have added a new `LambdaRouteBuilder` which allows to easily define a Camel route using Java lambda style:
+
+    rb -> rb.from("timer:foo").log("Hello Lambda");
+        
+For example users with Spring Boot or Quarkus may want to use dependency injection style to define
+beans and configurations; and now also Camel routes via lambda styles:
+
+For example in a Spring Boot configuration class you can add a Camel route via `@Bean` annotation:
+
+    @Bean
+    public LambdaRouteBuilder myRoute() {
+        return rb -> rb.from("kafka:cheese").to("jms:cheese");
+    }
+
+Notice you can only define 1 route per lambda route builder (you can have many `@Bean` methods).
+The regular `RouteBuilder` can define as many routes you want in the same builder.
+
+See more details at the [LambdaRouteBuilder](https://camel.apache.org/manual/latest/lambda-route-builder.html)
+documentation.
+
+#### Parameterize routes
+
+This is one of the biggest new feature which goes by the name [route templates](https://camel.apache.org/manual/latest/route-template.html).
+A route template is a way of parameterizing a route where you specify parameters that are mandatory,
+and which are optional, and potential default values and descriptions. Then you can instantiate new routes
+from the route templates by its template id, and the provided parameters.
+
+For example you can have a route template that define how clients can integrate with a given system of yours.
+Then as new clients is added, you can setup a new route from the template with client specific parameters.
+
+This feature will also play a great role in Apache Camel K and the serverless landscape with Knative.
+In this world the route templates are used as part of a bigger puzzle which we named _kamelets_. More details
+is coming in a new blog posts.
+
+See more details at the [route templates](https://camel.apache.org/manual/latest/route-template.html) documentation,
+and in this [little example](https://github.com/apache/camel-examples/tree/master/examples/camel-example-routetemplate).
+
+#### Even more reflection free
+
+We continued to remove usage of reflection in Camel and this time we discovered that were some parts
+of API components that could still use reflection. This has now been improved so they are using source code
+generated _configurers_ to configure themselves which means its all just regular Java method calls (no reflection).
+
+There were also a few spots in Rest DSL which wasn't reflection free either, this has been corrected.
+
+### Enhanced properties binding
+
+We have also enhanced the _configurers_ to include details about what value types collections contain (eg Map, List, arrays).
+That information is now used by Camel to do reflection free [binding collections](https://camel.apache.org/manual/latest/property-binding.html).
+Also when new entries have to be created in those collections.
+
+For example given the below configuration:
+
+    camel.beans.foo.countries[usa] = #class:com.foo.MyCountry
+    camel.beans.foo.countries[usa].name = United States of America
+    camel.beans.foo.countries[usa].language = EN
+    camel.beans.foo.countries[de] = #class:com.foo.MyCountry
+    camel.beans.foo.countries[de].name = Germany
+    camel.beans.foo.countries[de].language = DE
+
+Then the `foo` bean has a property named `country` that is a `java.util.Map` type.
+And the Map contains element of type `com.foo.MyCountry` that has been explicit configured above.
+
+However Camel is now capable to know this information by source code generated _configuers_:
+
+        @Configurer
+        public class Foo
+        
+            private Map<Country> countries;
+            
+            // getter/setter omitted
+        } 
+
+The `Foo` class has been annotated with `@Configurer` which allows Camel tooling to generate reflection free configurers source code.
+This is what Camel internally uses to do its vast configuration of all its EIPs, components and so on. Now we have exposed
+this for end users. Notice how the Map contains the collection type as a generic type with `Map<Country`. That information
+is now generated in the configuers, so Camel knows. Therefore the configuration can be shortned to:
+
+    camel.beans.foo.countries[usa].name = United States of America
+    camel.beans.foo.countries[usa].language = EN
+    camel.beans.foo.countries[de].name = Germany
+    camel.beans.foo.countries[de].language = DE
+
+There has been many other smaller improvements in Camels properties bindind. Camel uses this heavily internally during
+startup to configure and setup all of its things such as components, EIPs, routes etc. This work has been streamlined
+across the various runtimes; whether its standalone, Spring Boot, Quarkus, Camel K, Kafka Connector, or the good old XML routes.
+
+#### Java 14
+
+This is the first release that supports Java 14. 
+
+#### FluentProducerTemplate thread-safety
+
+The fluent `ProducerTemplate` had an issue where it may not be thread-safe. This has been corrected.
+
+### Spring Boot
+
+We have upgraded to latest release at this time which is Spring Boot 2.3.3.
+
+A new `camel-spring-boot-bom` BOM has been added that only contains the supported Camel Spring JARs for Spring Boot.
+The existing `camel-spring-boot-dependencies` is a much bigger set of BOM that is curated to align Camel and Spring Boot
+dependencies. For more details see the [following documentation](https://camel.apache.org/camel-spring-boot/latest/#_camel_spring_boot_bom_vs_camel_spring_boot_dependencies_bom).
+
+#### New components
+
+TODO: list of new components
+
+