Camel Spring XML Auto Configuration

This is only applicable when using Spring XML files with the camel-spring-xml JAR.

A spring XML file is the XML files that uses <beans> as root tag and have an embedded <camelContext>. This is the classic way of using XML DSL with Apache Camel, that was implemented before Spring Boot.

If you use Camel on Spring Boot, then look at Camel Context Auto Configuration instead.

Auto configuration of Optional Services

Camel will configure these functions by doing a lookup in the Spring bean registry to find beans of the given type.

The following list all requires at most 1 beans defined. If there are more than 1 bean of this type, then Camel will not use it.

Type Number of beans Description

PackageScanClassResolver

0..1

To use a 3rd party package scan resolver. More details at Pluggable Class Resolvers.

ClassResolver

0..1

To use a 3rd party class resolver. More details at Pluggable Class Resolvers.

FactoryFinderResolver

0..1

To use a 3rd party factory finder.

Registry

0..1

To use a 3rd party bean registry. By default Camel will use Spring ApplicationContext (when using Spring) as registry.

Debugger

0..1

To use a Debugger usually for tooling.

Tracer

0..1

To use a 3rd party Tracer.

TraceFormatter

0..1

To use a bean that has the tracing options configured.

Delayer

0..1

To use a 3rd part Delayer.

ManagementStrategy

0..1

To use a 3rd part strategy for management, for example JMX management.

ManagementNamingStrategy

0..1

To use a 3rd part strategy for naming MBeans for management.

NodeIdFactory

0..1

To use a 3rd part node id factory.

EventFactory

0..1

To use a 3rd part event factory.

EventNotifier

0..1

To use a 3rd part event notifier. In Camel 2.2 onwards you can have multiple notifiers, see next table.

InflightRepository

0..1

To use a 3rd part inflight repository.

ShutdownStrategy

0..1

To use a 3rd part shutdown strategy.

ExecutorServiceStrategy

0..1

To use a 3rd part executor service strategy. More details at Threading Model.

ExecutorServiceManager

0..1

To use a 3rd part executor service manager. More details at Threading Model.

ThreadPoolFactory

0..1

To use a 3rd part thread pool factory. More details at Threading Model.

ProcessorFactory

0..1

To use a 3rd part processor factory.

UuidGenerator

0..1

To use a 3rd part UuidGenerator.

StreamCachingStrategy

0..1

To use a 3rd part Stream caching strategy.

UnitOfWorkFactory

0..1

To use 3rd part UnitOfWork implementations created by the factory.

RuntimeEndpointRegistry

0..1

To use a 3rd party RuntimeEndpointRegistry implementation.

Logger

0..1

To use provided org.slf4j.Logger for Log component and log() EIP.

AsyncProcessorAwaitManager

0..1

To use a 3rd part async process await manager.

ModelJAXBContextFactory

0..1

To use a 3rd party model JAXB ContextFactory

MessageHistoryFactory

0..1

To use a 3rd party MessageHistoryFactory implementation.

And the following options have support for any number of beans defined.

Type Number of beans Description

InterceptStrategy

0..n

To use your own Intercept that intercepts every processing steps in all routes in the CamelContext. For instance you can use this to do an AOP like performance timer interceptor.

LifecycleStrategy

0..n

To use 3rd party lifecycle strategies. By default Camel uses a JMX aware that does JMX instrumentation.

EventNotifier

0..n

To use 3rd part event notifiers.

RoutePolicyFactory

0..n

To use a 3rd party route policy factory to create a route policy for every route.