Starter Configuration

Clear and accessible configuration is a crucial part of any application. Camel starters (Components, Data Formats, Languages) fully support Spring Boot’s external configuration mechanism. We’ve also added the possibility to configure them through Spring Beans for more complex uses cases.

Using External Configuration

Internally, every starter is configured through Spring Boot’s ConfigurationProperties. Each configuration parameter can be set in various ways (application.[properties|json|yaml] files, command line arguments, environments variables etc…​). Parameters have the form of camel.[component|language|dataformat].[name].[parameter]

For example to configure the URL of the ActiveMQ broker you can set:

Or to configure the delimeter of the CSV dataformat to be a semicolon(;) you can set:


Camel will use it’s TypeConverter mechanism when setting properties to the desired type.

You can refer to beans in the Registry using the #bean:name:


The Bean would be typically created in Java:

public JmsTransactionManager myjtaTransactionManager(PooledConnectionFactory pool) {
    JmsTransactionManager manager = new JmsTransactionManager(pool);
    return manager;

Beans can also be created in configuration files but it isn’t recommended for complex use cases.

Using Beans

Starters can also be created and configured via Spring Beans. Before creating a starter (Component, Dataformat, Language), Camel will first lookup it up in the Registry by it’s name if it already exists. For example to configure a Kafka component:

public KafkaComponent kafka(KafkaConfiguration kafkaconfiguration){
    return ComponentsBuilderFactory.kafka()

The Bean name has to be equal to that of the Component, Dataformat or Language your are configuring. If the Bean name isn’t specified in the annotation it will be set to the method name.

Typical Camel Spring Boot projects will use a combination of external configuration and Beans to configure their application. For more complete examples on how to configure your Camel Spring Boot project, you can refer to our example repository.

All contributions are welcome!