camel-stream-kafka-connector sink configuration
When using camel-stream-kafka-connector as sink make sure to use the following Maven dependency to have support for the connector:
<dependency>
<groupId>org.apache.camel.kafkaconnector</groupId>
<artifactId>camel-stream-kafka-connector</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel Kafka connector version -->
</dependency>
To use this Sink connector in Kafka connect you’ll need to set the following connector.class
connector.class=org.apache.camel.kafkaconnector.stream.CamelStreamSinkConnector
The camel-stream sink connector supports 12 options, which are listed below.
Name | Description | Default | Priority |
---|---|---|---|
camel.sink.path.kind |
Kind of stream to use such as System.in or System.out. One of: [in] [out] [err] [header] [file] |
null |
HIGH |
camel.sink.endpoint.encoding |
You can configure the encoding (is a charset name) to use text-based streams (for example, message body is a String object). If not provided, Camel uses the JVM default Charset. |
null |
MEDIUM |
camel.sink.endpoint.fileName |
When using the stream:file URI format, this option specifies the filename to stream to/from. |
null |
MEDIUM |
camel.sink.endpoint.autoCloseCount |
Number of messages to process before closing stream on Producer side. Never close stream by default (only when Producer is stopped). If more messages are sent, the stream is reopened for another autoCloseCount batch. |
null |
MEDIUM |
camel.sink.endpoint.closeOnDone |
This option is used in combination with Splitter and streaming to the same file. The idea is to keep the stream open and only close when the Splitter is done, to improve performance. Mind this requires that you only stream to the same file, and not 2 or more files. |
false |
MEDIUM |
camel.sink.endpoint.delay |
Initial delay in milliseconds before producing the stream. |
null |
MEDIUM |
camel.sink.endpoint.lazyStartProducer |
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 |
MEDIUM |
camel.sink.endpoint.basicPropertyBinding |
Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities |
false |
MEDIUM |
camel.sink.endpoint.readTimeout |
Sets the read timeout to a specified timeout, in milliseconds. A non-zero value specifies the timeout when reading from Input stream when a connection is established to a resource. If the timeout expires before there is data available for read, a java.net.SocketTimeoutException is raised. A timeout of zero is interpreted as an infinite timeout. |
null |
MEDIUM |
camel.sink.endpoint.synchronous |
Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). |
false |
MEDIUM |
camel.component.stream.lazyStartProducer |
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 |
MEDIUM |
camel.component.stream.basicPropertyBinding |
Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities |
false |
MEDIUM |