Camel Spring Boot

ClickHouse

Insert data into tables of the ClickHouse columnar database and run SQL queries.

What’s inside

Please refer to the above links for usage and configuration details.

Maven coordinates

<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-clickhouse-starter</artifactId>
</dependency>

Spring Boot Auto-Configuration

The starter supports 9 options, which are listed below.

Name Description Default Type

camel.component.clickhouse.autowired-enabled

Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.

true

Boolean

camel.component.clickhouse.client

The shared ClickHouse client (com.clickhouse.client.api.Client) that all the endpoints of this component use, for settings this component has no option for (such as a trust store or timeouts). An insert of a List body needs it, as the class of the objects must be registered on it with Client.register(Class, TableSchema). When set, the endpoints do not create their own client, and the serverUrl, username, password, ssl and compression options are not used. The option is a com.clickhouse.client.api.Client type.

Client

camel.component.clickhouse.compression

Whether the client compresses the body of each request it sends (the data of an insert, the SQL of a query) in the ClickHouse compressed block format, with ZSTD, the default compression method of the client. Not used when a shared client is set.

false

Boolean

camel.component.clickhouse.enabled

Whether to enable auto configuration of the clickhouse component. This is enabled by default.

Boolean

camel.component.clickhouse.lazy-start-producer

Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing.

false

Boolean

camel.component.clickhouse.password

The password of the ClickHouse user. Empty when not set. Not used when a shared client is set.

String

camel.component.clickhouse.server-url

The URL of the ClickHouse HTTP interface, with scheme and port, such as http://localhost:8123 (the port is required). Used by every endpoint that does not set its own serverUrl. Not used when a shared client is set.

String

camel.component.clickhouse.ssl

Whether to connect over HTTPS: the http:// scheme of serverUrl (or a URL without scheme) is changed to https://, but the port is not, so serverUrl must give the HTTPS port of the server (such as 8443). A serverUrl that starts with https:// uses HTTPS also when this option is false. The client checks the server certificate and host name against the default trust store of the JVM. Not used when a shared client is set.

false

Boolean

camel.component.clickhouse.username

The name of the ClickHouse user. The client sends it with the password in HTTP basic authentication on each request. Not used when a shared client is set.

default

String