This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 1cc93e76f8bff04c9a0392196bd79db9f4a4044c Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Wed Apr 15 10:17:37 2020 +0200 CAMEL-14887: Move camel-headersmap from core to components --- docs/components/modules/others/nav.adoc | 1 + .../modules/others/pages/headersmap.adoc | 43 ++++++++++++++++++++++ parent/pom.xml | 5 +++ 3 files changed, 49 insertions(+) diff --git a/docs/components/modules/others/nav.adoc b/docs/components/modules/others/nav.adoc index 6a1e994..d8e733a 100644 --- a/docs/components/modules/others/nav.adoc +++ b/docs/components/modules/others/nav.adoc @@ -6,6 +6,7 @@ ** xref:aws-xray.adoc[AWS XRay] ** xref:cdi.adoc[CDI] ** xref:cxf-transport.adoc[CXF Transport] +** xref:headersmap.adoc[Headersmap] ** xref:hystrix.adoc[Hystrix] ** xref:jasypt.adoc[Jasypt] ** xref:leveldb.adoc[LevelDB] diff --git a/docs/components/modules/others/pages/headersmap.adoc b/docs/components/modules/others/pages/headersmap.adoc new file mode 100644 index 0000000..b0c94ae --- /dev/null +++ b/docs/components/modules/others/pages/headersmap.adoc @@ -0,0 +1,43 @@ +[[headersmap-component]] += Headersmap Component +:page-source: components/camel-headersmap/src/main/docs/headersmap.adoc +:docTitle: Headersmap +:artifactId: camel-headersmap +:description: Fast case-insensitive headers map implementation +:since: 2.20 +:supportLevel: Stable + +*Since Camel {since}* + +The camel-headersmap is a faster implementation of a case-insenstive map which can be plugged in +and used by Camel at runtime to have slight faster performance in the Camel Message headers. + +== Auto detection from classpath + +To use this implementation all you need to do is to add the `camel-headersmap` dependency to the classpath, +and Camel should auto-detect this on startup and log as follows: + +[source,text] +---- +Detected and using HeadersMapFactory: camel-headersmap +---- + +== Manual enabling + +If you use OSGi or the implementation is not added to the classpath, you need to enable this explicit such: + +[source,java] +---- +CamelContext camel = ... + +camel.setHeadersMapFactory(new FastHeadersMapFactory()); +---- + +Or in XML DSL (spring or blueprint XML file) you can declare the factory as a `<bean>`: + +[source,xml] +---- +<bean id="fastMapFactory" class="org.apache.camel.component.headersmap.FastHeadersMapFactory"/> +---- + +and then Camel should detect the bean and use the factory. diff --git a/parent/pom.xml b/parent/pom.xml index fd89967f..a297aaa 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -1472,6 +1472,11 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-headersmap</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-hipchat</artifactId> <version>${project.version}</version> </dependency>