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
The following commit(s) were added to refs/heads/master by this push: new f43950a Polished f43950a is described below commit f43950ae0f9812c4bdd5b09c2146c80bce71ee29 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri May 3 14:14:49 2019 +0200 Polished --- core/camel-headersmap/src/main/docs/headersmap.adoc | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/core/camel-headersmap/src/main/docs/headersmap.adoc b/core/camel-headersmap/src/main/docs/headersmap.adoc index 8b9283f..6947bc1 100644 --- a/core/camel-headersmap/src/main/docs/headersmap.adoc +++ b/core/camel-headersmap/src/main/docs/headersmap.adoc @@ -1,35 +1,38 @@ -## HeadersMap +== HeadersMap *Available as of Camel 2.20* 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 +=== 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 custom HeadersMapFactory: org.apache.camel.component.headersmap.FastHeadersMapFactory@71e9ebae -``` +---- For spring-boot there is a `camel-headersmap-starter` dependency you should use. -### Manual enabling +=== Manual enabling If you use OSGi or the implementation is not added to the classpath, you need to enable this explict 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. \ No newline at end of file