[[headersmap-other]]
= Headersmap Component
//THIS FILE IS COPIED: EDIT THE SOURCE FILE:
: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
include::{cq-version}@camel-quarkus:ROOT:partial$reference/others/headersmap.adoc[opts=optional]

*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.
