// kafka-connector options: START
[[camel-kafka-kafka-connector-sink]]
= camel-kafka-kafka-connector sink configuration

When using camel-kafka-kafka-connector as sink make sure to use the following Maven dependency to have support for the connector:

[source,xml]
----
<dependency>
  <groupId>org.apache.camel.kafkaconnector</groupId>
  <artifactId>camel-kafka-kafka-connector</artifactId>
  <version>x.x.x</version>
  <!-- use the same version as your Camel Kafka connector version -->
</dependency>
----


The camel-kafka sink connector supports 72 options, which are listed below.



[width="100%",cols="2,5,^1,2",options="header"]
|===
| Name | Description | Default | Priority
| *camel.sink.path.topic* | Name of the topic to use. On the consumer you can use comma to separate multiple topics. A producer can only send a message to a single topic. | null | ConfigDef.Importance.HIGH
| *camel.sink.endpoint.additional Properties* | Sets additional properties for either kafka consumer or kafka producer in case they can't be set directly on the camel configurations (e.g: new Kafka properties that are not reflected yet in Camel configurations), the properties have to be prefixed with additionalProperties.. E.g: additionalProperties.transactional.id=12345&additionalProperties.schema.registry.url=\http://localhost:8811/avro | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.brokers* | URL of the Kafka brokers to use. The format is host1:port1,host2:port2, and the list can be a subset of brokers or a VIP pointing to a subset of brokers. This option is known as bootstrap.servers in the Kafka documentation. | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.clientId* | The client id is a user-specified string sent in each request to help trace calls. It should logically identify the application making the request. | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.header FilterStrategy* | To use a custom HeaderFilterStrategy to filter header to and from Camel message. | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.reconnect BackoffMaxMs* | The maximum amount of time in milliseconds to wait when reconnecting to a broker that has repeatedly failed to connect. If provided, the backoff per host will increase exponentially for each consecutive connection failure, up to this maximum. After calculating the backoff increase, 20% random jitter is added to avoid connection storms. | "1000" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.buffer MemorySize* | The total bytes of memory the producer can use to buffer records waiting to be sent to the server. If records are sent faster than they can be delivered to the server the producer will either block or throw an exception based on the preference specified by block.on.buffer.full.This setting should correspond roughly to the total memory the producer will use, but is not a hard bound since not all memory the producer uses is used for buffering. Some additional memory will be used for compression (if compression is enabled) as well as for maintaining in-flight requests. | "33554432" | ConfigDef.Importance.MEDIUM
| * camel.sink.endpoint.compression Codec* | This parameter allows you to specify the compression codec for all data generated by this producer. Valid values are none, gzip and snappy. One of: [none] [gzip] [snappy] [lz4] | "none" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.connection MaxIdleMs* | Close idle connections after the number of milliseconds specified by this config. | "540000" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.enable Idempotence* | If set to 'true' the producer will ensure that exactly one copy of each message is written in the stream. If 'false', producer retries may write duplicates of the retried message in the stream. If set to true this option will require max.in.flight.requests.per.connection to be set to 1 and retries cannot be zero and additionally acks must be set to 'all'. | false | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.kafka HeaderSerializer* | To use a custom KafkaHeaderSerializer to serialize kafka headers values | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.key* | The record key (or null if no key is specified). If this option has been configured then it take precedence over header KafkaConstants#KEY | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.key SerializerClass* | The serializer class for keys (defaults to the same as for messages if nothing is given). | "org.apache.kafka.common.serialization.StringSerializer" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.lazyStart 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 | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.lingerMs* | The producer groups together any records that arrive in between request transmissions into a single batched request. Normally this occurs only under load when records arrive faster than they can be sent out. However in some circumstances the client may want to reduce the number of requests even under moderate load. This setting accomplishes this by adding a small amount of artificial delay�that is, rather than immediately sending out a record the producer will wait for up to the given delay to allow other records to be sent so that the sends can be batched together. This can be thought of as analogous to Nagle's algorithm in TCP. This setting gives the upper bound on the delay for batching: once we get batch.size worth of records for a partition it will be sent immediately regardless of this setting, however if we have fewer than this many bytes accumulated for this partition we will 'linger' for the specified time waiting for more records to show up. This setting defaults to 0 (i.e. no delay). Setting linger.ms=5, for example, would have the effect of reducing the number of requests sent but would add up to 5ms of latency to records sent in the absense of load. | "0" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.maxBlockMs* | The configuration controls how long sending to kafka will block. These methods can be blocked for multiple reasons. For e.g: buffer full, metadata unavailable.This configuration imposes maximum limit on the total time spent in fetching metadata, serialization of key and value, partitioning and allocation of buffer memory when doing a send(). In case of partitionsFor(), this configuration imposes a maximum time threshold on waiting for metadata | "60000" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.maxIn FlightRequest* | The maximum number of unacknowledged requests the client will send on a single connection before blocking. Note that if this setting is set to be greater than 1 and there are failed sends, there is a risk of message re-ordering due to retries (i.e., if retries are enabled). | "5" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.maxRequest Size* | The maximum size of a request. This is also effectively a cap on the maximum record size. Note that the server has its own cap on record size which may be different from this. This setting will limit the number of record batches the producer will send in a single request to avoid sending huge requests. | "1048576" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.metadata MaxAgeMs* | The period of time in milliseconds after which we force a refresh of metadata even if we haven't seen any partition leadership changes to proactively discover any new brokers or partitions. | "300000" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.metric Reporters* | A list of classes to use as metrics reporters. Implementing the MetricReporter interface allows plugging in classes that will be notified of new metric creation. The JmxReporter is always included to register JMX statistics. | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.metrics SampleWindowMs* | The number of samples maintained to compute metrics. | "30000" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.noOf MetricsSample* | The number of samples maintained to compute metrics. | "2" | ConfigDef.Importance.MEDIUM
| * camel.sink.endpoint.partitioner* | The partitioner class for partitioning messages amongst sub-topics. The default partitioner is based on the hash of the key. | "org.apache.kafka.clients.producer.internals.DefaultPartitioner" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.partition Key* | The partition to which the record will be sent (or null if no partition was specified). If this option has been configured then it take precedence over header KafkaConstants#PARTITION_KEY | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.producer BatchSize* | The producer will attempt to batch records together into fewer requests whenever multiple records are being sent to the same partition. This helps performance on both the client and the server. This configuration controls the default batch size in bytes. No attempt will be made to batch records larger than this size.Requests sent to brokers will contain multiple batches, one for each partition with data available to be sent.A small batch size will make batching less common and may reduce throughput (a batch size of zero will disable batching entirely). A very large batch size may use memory a bit more wastefully as we will always allocate a buffer of the specified batch size in anticipation of additional records. | "16384" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.queue BufferingMaxMessages* | The maximum number of unsent messages that can be queued up the producer when using async mode before either the producer must be blocked or data must be dropped. | "10000" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.receive BufferBytes* | The size of the TCP receive buffer (SO_RCVBUF) to use when reading data. | "65536" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.reconnect BackoffMs* | The amount of time to wait before attempting to reconnect to a given host. This avoids repeatedly connecting to a host in a tight loop. This backoff applies to all requests sent by the consumer to the broker. | "50" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.record Metadata* | Whether the producer should store the RecordMetadata results from sending to Kafka. The results are stored in a List containing the RecordMetadata metadata's. The list is stored on a header with the key KafkaConstants#KAFKA_RECORDMETA | true | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.request RequiredAcks* | The number of acknowledgments the producer requires the leader to have received before considering a request complete. This controls the durability of records that are sent. The following settings are common: acks=0 If set to zero then the producer will not wait for any acknowledgment from the server at all. The record will be immediately added to the socket buffer and considered sent. No guarantee can be made that the server has received the record in this case, and the retries configuration will not take effect (as the client won't generally know of any failures). The offset given back for each record will always be set to -1. acks=1 This will mean the leader will write the record to its local log but will respond without awaiting full acknowledgement from all followers. In this case should the leader fail immediately after acknowledging the record but before the followers have replicated it then the record will be lost. acks=all This means the leader will wait for the full set of in-sync replicas to acknowledge the record. This guarantees that the record will not be lost as long as at least one in-sync replica remains alive. This is the strongest available guarantee. One of: [-1] [0] [1] [all] | "1" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.request TimeoutMs* | The amount of time the broker will wait trying to meet the request.required.acks requirement before sending back an error to the client. | "305000" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.retries* | Setting a value greater than zero will cause the client to resend any record whose send fails with a potentially transient error. Note that this retry is no different than if the client resent the record upon receiving the error. Allowing retries will potentially change the ordering of records because if two records are sent to a single partition, and the first fails and is retried but the second succeeds, then the second record may appear first. | "0" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.retry BackoffMs* | Before each retry, the producer refreshes the metadata of relevant topics to see if a new leader has been elected. Since leader election takes a bit of time, this property specifies the amount of time that the producer waits before refreshing the metadata. | "100" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.sendBuffer Bytes* | Socket write buffer size | "131072" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.serializer Class* | The serializer class for messages. | "org.apache.kafka.common.serialization.StringSerializer" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.workerPool* | To use a custom worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.workerPool CoreSize* | Number of core threads for the worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. | "10" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.workerPool MaxSize* | Maximum number of threads for the worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. | "20" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.basic PropertyBinding* | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | ConfigDef.Importance.MEDIUM
| * camel.sink.endpoint.synchronous* | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | ConfigDef.Importance.MEDIUM
| * camel.sink.endpoint.interceptor Classes* | Sets interceptors for producer or consumers. Producer interceptors have to be classes implementing org.apache.kafka.clients.producer.ProducerInterceptor Consumer interceptors have to be classes implementing org.apache.kafka.clients.consumer.ConsumerInterceptor Note that if you use Producer interceptor on a consumer it will throw a class cast exception in runtime | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.kerberos BeforeReloginMinTime* | Login thread sleep time between refresh attempts. | "60000" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.kerberos InitCmd* | Kerberos kinit command path. Default is /usr/bin/kinit | "/usr/bin/kinit" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.kerberos PrincipalToLocalRules* | A list of rules for mapping from principal names to short names (typically operating system usernames). The rules are evaluated in order and the first rule that matches a principal name is used to map it to a short name. Any later rules in the list are ignored. By default, principal names of the form \{username\}/\{hostname\}\{REALM\} are mapped to \{username\}. For more details on the format please see the security authorization and acls documentation.. Multiple values can be separated by comma | "DEFAULT" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.kerberos RenewJitter* | Percentage of random jitter added to the renewal time. | "0.05" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.kerberos RenewWindowFactor* | Login thread will sleep until the specified window factor of time from last refresh to ticket's expiry has been reached, at which time it will try to renew the ticket. | "0.8" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.saslJaas Config* | Expose the kafka sasl.jaas.config parameter Example: org.apache.kafka.common.security.plain.PlainLoginModule required username=USERNAME password=PASSWORD; | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.sasl KerberosServiceName* | The Kerberos principal name that Kafka runs as. This can be defined either in Kafka's JAAS config or in Kafka's config. | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.sasl Mechanism* | The Simple Authentication and Security Layer (SASL) Mechanism used. For the valid values see a href= \http://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml\http://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml | "GSSAPI" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.security Protocol* | Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT and SSL are supported | "PLAINTEXT" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.sslCipher Suites* | A list of cipher suites. This is a named combination of authentication, encryption, MAC and key exchange algorithm used to negotiate the security settings for a network connection using TLS or SSL network protocol.By default all the available cipher suites are supported. | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.sslContext Parameters* | SSL configuration using a Camel SSLContextParameters object. If configured it's applied before the other SSL endpoint parameters. | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.sslEnabled Protocols* | The list of protocols enabled for SSL connections. TLSv1.2, TLSv1.1 and TLSv1 are enabled by default. | "TLSv1.2,TLSv1.1,TLSv1" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.ssl EndpointAlgorithm* | The endpoint identification algorithm to validate server hostname using server certificate. | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.ssl KeymanagerAlgorithm* | The algorithm used by key manager factory for SSL connections. Default value is the key manager factory algorithm configured for the Java Virtual Machine. | "SunX509" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.sslKey Password* | The password of the private key in the key store file. This is optional for client. | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.ssl KeystoreLocation* | The location of the key store file. This is optional for client and can be used for two-way authentication for client. | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.ssl KeystorePassword* | The store password for the key store file.This is optional for client and only needed if ssl.keystore.location is configured. | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.ssl KeystoreType* | The file format of the key store file. This is optional for client. Default value is JKS | "JKS" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.ssl Protocol* | The SSL protocol used to generate the SSLContext. Default setting is TLS, which is fine for most cases. Allowed values in recent JVMs are TLS, TLSv1.1 and TLSv1.2. SSL, SSLv2 and SSLv3 may be supported in older JVMs, but their usage is discouraged due to known security vulnerabilities. | "TLS" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.ssl Provider* | The name of the security provider used for SSL connections. Default value is the default security provider of the JVM. | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.ssl TrustmanagerAlgorithm* | The algorithm used by trust manager factory for SSL connections. Default value is the trust manager factory algorithm configured for the Java Virtual Machine. | "PKIX" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.ssl TruststoreLocation* | The location of the trust store file. | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.ssl TruststorePassword* | The password for the trust store file. | null | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.ssl TruststoreType* | The file format of the trust store file. Default value is JKS. | "JKS" | ConfigDef.Importance.MEDIUM
| *camel.sink.endpoint.schema RegistryURL* | URL of the Confluent Platform schema registry servers to use. The format is host1:port1,host2:port2. This is known as schema.registry.url in the Confluent Platform documentation. This option is only available in the Confluent Platform (not standard Apache Kafka) | null | ConfigDef.Importance.MEDIUM
| *camel.component.kafka.brokers* | URL of the Kafka brokers to use. The format is host1:port1,host2:port2, and the list can be a subset of brokers or a VIP pointing to a subset of brokers. This option is known as bootstrap.servers in the Kafka documentation. | null | ConfigDef.Importance.MEDIUM
| * camel.component.kafka.configuration* | Allows to pre-configure the Kafka component with common options that the endpoints will reuse. | null | ConfigDef.Importance.MEDIUM
| *camel.component.kafka.lazy StartProducer* | 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 | ConfigDef.Importance.MEDIUM
| *camel.component.kafka.basic PropertyBinding* | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | ConfigDef.Importance.MEDIUM
| *camel.component.kafka.worker Pool* | To use a shared custom worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. If using this option then you must handle the lifecycle of the thread pool to shut the pool down when no longer needed. | null | ConfigDef.Importance.MEDIUM
| *camel.component.kafka.use GlobalSslContextParameters* | Enable usage of global SSL context parameters. | false | ConfigDef.Importance.MEDIUM
|===
// kafka-connector options: END
