Interface KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
-
- All Superinterfaces:
org.apache.camel.builder.EndpointProducerBuilder
,org.apache.camel.EndpointProducerResolver
- All Known Subinterfaces:
KafkaEndpointBuilderFactory.KafkaEndpointBuilder
- Enclosing interface:
- KafkaEndpointBuilderFactory
public static interface KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder extends org.apache.camel.builder.EndpointProducerBuilder
Builder for endpoint producers for the Kafka component.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
additionalProperties(String key, Object value)
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..default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
additionalProperties(Map values)
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..default KafkaEndpointBuilderFactory.AdvancedKafkaEndpointProducerBuilder
advanced()
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
batchWithIndividualHeaders(boolean batchWithIndividualHeaders)
If this feature is enabled and a single element of a batch is an Exchange or Message, the producer will generate individual kafka header values for it by using the batch Message to determine the values.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
batchWithIndividualHeaders(String batchWithIndividualHeaders)
If this feature is enabled and a single element of a batch is an Exchange or Message, the producer will generate individual kafka header values for it by using the batch Message to determine the values.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
brokers(String brokers)
URL of the Kafka brokers to use.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
bufferMemorySize(Integer bufferMemorySize)
The total bytes of memory the producer can use to buffer records waiting to be sent to the server.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
bufferMemorySize(String bufferMemorySize)
The total bytes of memory the producer can use to buffer records waiting to be sent to the server.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
clientId(String clientId)
The client id is a user-specified string sent in each request to help trace calls.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
compressionCodec(String compressionCodec)
This parameter allows you to specify the compression codec for all data generated by this producer.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
connectionMaxIdleMs(Integer connectionMaxIdleMs)
Close idle connections after the number of milliseconds specified by this config.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
connectionMaxIdleMs(String connectionMaxIdleMs)
Close idle connections after the number of milliseconds specified by this config.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
deliveryTimeoutMs(Integer deliveryTimeoutMs)
An upper bound on the time to report success or failure after a call to send() returns.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
deliveryTimeoutMs(String deliveryTimeoutMs)
An upper bound on the time to report success or failure after a call to send() returns.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
enableIdempotence(boolean enableIdempotence)
If set to 'true' the producer will ensure that exactly one copy of each message is written in the stream.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
enableIdempotence(String enableIdempotence)
If set to 'true' the producer will ensure that exactly one copy of each message is written in the stream.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
headerFilterStrategy(String headerFilterStrategy)
To use a custom HeaderFilterStrategy to filter header to and from Camel message.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
headerFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
To use a custom HeaderFilterStrategy to filter header to and from Camel message.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
headerSerializer(String headerSerializer)
To use a custom KafkaHeaderSerializer to serialize kafka headers values.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
headerSerializer(org.apache.camel.component.kafka.serde.KafkaHeaderSerializer headerSerializer)
To use a custom KafkaHeaderSerializer to serialize kafka headers values.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
interceptorClasses(String interceptorClasses)
Sets interceptors for producer or consumers.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
kerberosBeforeReloginMinTime(Integer kerberosBeforeReloginMinTime)
Login thread sleep time between refresh attempts.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
kerberosBeforeReloginMinTime(String kerberosBeforeReloginMinTime)
Login thread sleep time between refresh attempts.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
kerberosInitCmd(String kerberosInitCmd)
Kerberos kinit command path.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
kerberosPrincipalToLocalRules(String kerberosPrincipalToLocalRules)
A list of rules for mapping from principal names to short names (typically operating system usernames).default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
kerberosRenewJitter(Double kerberosRenewJitter)
Percentage of random jitter added to the renewal time.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
kerberosRenewJitter(String kerberosRenewJitter)
Percentage of random jitter added to the renewal time.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
kerberosRenewWindowFactor(Double kerberosRenewWindowFactor)
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.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
kerberosRenewWindowFactor(String kerberosRenewWindowFactor)
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.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
key(String key)
The record key (or null if no key is specified).default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
keySerializer(String keySerializer)
The serializer class for keys (defaults to the same as for messages if nothing is given).default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
lingerMs(Integer lingerMs)
The producer groups together any records that arrive in between request transmissions into a single batched request.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
lingerMs(String lingerMs)
The producer groups together any records that arrive in between request transmissions into a single batched request.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
maxBlockMs(Integer maxBlockMs)
The configuration controls how long the KafkaProducer's send(), partitionsFor(), initTransactions(), sendOffsetsToTransaction(), commitTransaction() and abortTransaction() methods will block.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
maxBlockMs(String maxBlockMs)
The configuration controls how long the KafkaProducer's send(), partitionsFor(), initTransactions(), sendOffsetsToTransaction(), commitTransaction() and abortTransaction() methods will block.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
maxInFlightRequest(Integer maxInFlightRequest)
The maximum number of unacknowledged requests the client will send on a single connection before blocking.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
maxInFlightRequest(String maxInFlightRequest)
The maximum number of unacknowledged requests the client will send on a single connection before blocking.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
maxRequestSize(Integer maxRequestSize)
The maximum size of a request.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
maxRequestSize(String maxRequestSize)
The maximum size of a request.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
metadataMaxAgeMs(Integer metadataMaxAgeMs)
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.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
metadataMaxAgeMs(String metadataMaxAgeMs)
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.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
metricReporters(String metricReporters)
A list of classes to use as metrics reporters.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
metricsSampleWindowMs(Integer metricsSampleWindowMs)
The window of time a metrics sample is computed over.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
metricsSampleWindowMs(String metricsSampleWindowMs)
The window of time a metrics sample is computed over.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
noOfMetricsSample(Integer noOfMetricsSample)
The number of samples maintained to compute metrics.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
noOfMetricsSample(String noOfMetricsSample)
The number of samples maintained to compute metrics.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
partitioner(String partitioner)
The partitioner class for partitioning messages amongst sub-topics.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
partitionKey(Integer partitionKey)
The partition to which the record will be sent (or null if no partition was specified).default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
partitionKey(String partitionKey)
The partition to which the record will be sent (or null if no partition was specified).default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
producerBatchSize(Integer producerBatchSize)
The producer will attempt to batch records together into fewer requests whenever multiple records are being sent to the same partition.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
producerBatchSize(String producerBatchSize)
The producer will attempt to batch records together into fewer requests whenever multiple records are being sent to the same partition.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
queueBufferingMaxMessages(Integer queueBufferingMaxMessages)
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.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
queueBufferingMaxMessages(String queueBufferingMaxMessages)
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.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
receiveBufferBytes(Integer receiveBufferBytes)
The size of the TCP receive buffer (SO_RCVBUF) to use when reading data.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
receiveBufferBytes(String receiveBufferBytes)
The size of the TCP receive buffer (SO_RCVBUF) to use when reading data.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
reconnectBackoffMaxMs(Integer reconnectBackoffMaxMs)
The maximum amount of time in milliseconds to wait when reconnecting to a broker that has repeatedly failed to connect.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
reconnectBackoffMaxMs(String reconnectBackoffMaxMs)
The maximum amount of time in milliseconds to wait when reconnecting to a broker that has repeatedly failed to connect.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
reconnectBackoffMs(Integer reconnectBackoffMs)
The amount of time to wait before attempting to reconnect to a given host.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
reconnectBackoffMs(String reconnectBackoffMs)
The amount of time to wait before attempting to reconnect to a given host.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
recordMetadata(boolean recordMetadata)
Whether the producer should store the RecordMetadata results from sending to Kafka.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
recordMetadata(String recordMetadata)
Whether the producer should store the RecordMetadata results from sending to Kafka.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
requestRequiredAcks(String requestRequiredAcks)
The number of acknowledgments the producer requires the leader to have received before considering a request complete.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
requestTimeoutMs(Integer requestTimeoutMs)
The amount of time the broker will wait trying to meet the request.required.acks requirement before sending back an error to the client.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
requestTimeoutMs(String requestTimeoutMs)
The amount of time the broker will wait trying to meet the request.required.acks requirement before sending back an error to the client.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
retries(Integer retries)
Setting a value greater than zero will cause the client to resend any record whose send fails with a potentially transient error.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
retries(String retries)
Setting a value greater than zero will cause the client to resend any record whose send fails with a potentially transient error.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
retryBackoffMs(Integer retryBackoffMs)
Before each retry, the producer refreshes the metadata of relevant topics to see if a new leader has been elected.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
retryBackoffMs(String retryBackoffMs)
Before each retry, the producer refreshes the metadata of relevant topics to see if a new leader has been elected.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
saslJaasConfig(String saslJaasConfig)
Expose the kafka sasl.jaas.config parameter Example: org.apache.kafka.common.security.plain.PlainLoginModule required username=USERNAME password=PASSWORD;.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
saslKerberosServiceName(String saslKerberosServiceName)
The Kerberos principal name that Kafka runs as.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
saslMechanism(String saslMechanism)
The Simple Authentication and Security Layer (SASL) Mechanism used.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
schemaRegistryURL(String schemaRegistryURL)
URL of the Confluent Platform schema registry servers to use.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
securityProtocol(String securityProtocol)
Protocol used to communicate with brokers.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sendBufferBytes(Integer sendBufferBytes)
Socket write buffer size.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sendBufferBytes(String sendBufferBytes)
Socket write buffer size.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
shutdownTimeout(int shutdownTimeout)
Timeout in milliseconds to wait gracefully for the consumer or producer to shutdown and terminate its worker threads.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
shutdownTimeout(String shutdownTimeout)
Timeout in milliseconds to wait gracefully for the consumer or producer to shutdown and terminate its worker threads.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sslCipherSuites(String sslCipherSuites)
A list of cipher suites.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sslContextParameters(String sslContextParameters)
SSL configuration using a Camel SSLContextParameters object.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)
SSL configuration using a Camel SSLContextParameters object.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sslEnabledProtocols(String sslEnabledProtocols)
The list of protocols enabled for SSL connections.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sslEndpointAlgorithm(String sslEndpointAlgorithm)
The endpoint identification algorithm to validate server hostname using server certificate.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sslKeymanagerAlgorithm(String sslKeymanagerAlgorithm)
The algorithm used by key manager factory for SSL connections.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sslKeyPassword(String sslKeyPassword)
The password of the private key in the key store file.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sslKeystoreLocation(String sslKeystoreLocation)
The location of the key store file.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sslKeystorePassword(String sslKeystorePassword)
The store password for the key store file.This is optional for client and only needed if ssl.keystore.location is configured.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sslKeystoreType(String sslKeystoreType)
The file format of the key store file.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sslProtocol(String sslProtocol)
The SSL protocol used to generate the SSLContext.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sslProvider(String sslProvider)
The name of the security provider used for SSL connections.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sslTrustmanagerAlgorithm(String sslTrustmanagerAlgorithm)
The algorithm used by trust manager factory for SSL connections.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sslTruststoreLocation(String sslTruststoreLocation)
The location of the trust store file.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sslTruststorePassword(String sslTruststorePassword)
The password for the trust store file.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
sslTruststoreType(String sslTruststoreType)
The file format of the trust store file.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
valueSerializer(String valueSerializer)
The serializer class for messages.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
workerPool(String 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.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
workerPool(ExecutorService 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.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
workerPoolCoreSize(Integer workerPoolCoreSize)
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.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
workerPoolCoreSize(String workerPoolCoreSize)
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.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
workerPoolMaxSize(Integer workerPoolMaxSize)
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.default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder
workerPoolMaxSize(String workerPoolMaxSize)
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.
-
-
-
Method Detail
-
advanced
default KafkaEndpointBuilderFactory.AdvancedKafkaEndpointProducerBuilder advanced()
-
additionalProperties
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder additionalProperties(String key, Object value)
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. The option is a: <code>java.util.Map<java.lang.String, java.lang.Object></code> type. The option is multivalued, and you can use the additionalProperties(String, Object) method to add a value (call the method multiple times to set more values). Group: common- Parameters:
key
- the option keyvalue
- the option value- Returns:
- the dsl builder
-
additionalProperties
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder additionalProperties(Map values)
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. The option is a: <code>java.util.Map<java.lang.String, java.lang.Object></code> type. The option is multivalued, and you can use the additionalProperties(String, Object) method to add a value (call the method multiple times to set more values). Group: common- Parameters:
values
- the values- Returns:
- the dsl builder
-
brokers
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder brokers(String 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. The option is a: <code>java.lang.String</code> type. Group: common- Parameters:
brokers
- the value to set- Returns:
- the dsl builder
-
clientId
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder clientId(String 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. The option is a: <code>java.lang.String</code> type. Group: common- Parameters:
clientId
- the value to set- Returns:
- the dsl builder
-
headerFilterStrategy
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder headerFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
To use a custom HeaderFilterStrategy to filter header to and from Camel message. The option is a: <code>org.apache.camel.spi.HeaderFilterStrategy</code> type. Group: common- Parameters:
headerFilterStrategy
- the value to set- Returns:
- the dsl builder
-
headerFilterStrategy
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder headerFilterStrategy(String headerFilterStrategy)
To use a custom HeaderFilterStrategy to filter header to and from Camel message. The option will be converted to a <code>org.apache.camel.spi.HeaderFilterStrategy</code> type. Group: common- Parameters:
headerFilterStrategy
- the value to set- Returns:
- the dsl builder
-
reconnectBackoffMaxMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder reconnectBackoffMaxMs(Integer reconnectBackoffMaxMs)
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. The option is a: <code>java.lang.Integer</code> type. Default: 1000 Group: common- Parameters:
reconnectBackoffMaxMs
- the value to set- Returns:
- the dsl builder
-
reconnectBackoffMaxMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder reconnectBackoffMaxMs(String reconnectBackoffMaxMs)
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. The option will be converted to a <code>java.lang.Integer</code> type. Default: 1000 Group: common- Parameters:
reconnectBackoffMaxMs
- the value to set- Returns:
- the dsl builder
-
shutdownTimeout
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder shutdownTimeout(int shutdownTimeout)
Timeout in milliseconds to wait gracefully for the consumer or producer to shutdown and terminate its worker threads. The option is a: <code>int</code> type. Default: 30000 Group: common- Parameters:
shutdownTimeout
- the value to set- Returns:
- the dsl builder
-
shutdownTimeout
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder shutdownTimeout(String shutdownTimeout)
Timeout in milliseconds to wait gracefully for the consumer or producer to shutdown and terminate its worker threads. The option will be converted to a <code>int</code> type. Default: 30000 Group: common- Parameters:
shutdownTimeout
- the value to set- Returns:
- the dsl builder
-
batchWithIndividualHeaders
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder batchWithIndividualHeaders(boolean batchWithIndividualHeaders)
If this feature is enabled and a single element of a batch is an Exchange or Message, the producer will generate individual kafka header values for it by using the batch Message to determine the values. Normal behaviour consists in always using the same header values (which are determined by the parent Exchange which contains the Iterable or Iterator). The option is a: <code>boolean</code> type. Default: false Group: producer- Parameters:
batchWithIndividualHeaders
- the value to set- Returns:
- the dsl builder
-
batchWithIndividualHeaders
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder batchWithIndividualHeaders(String batchWithIndividualHeaders)
If this feature is enabled and a single element of a batch is an Exchange or Message, the producer will generate individual kafka header values for it by using the batch Message to determine the values. Normal behaviour consists in always using the same header values (which are determined by the parent Exchange which contains the Iterable or Iterator). The option will be converted to a <code>boolean</code> type. Default: false Group: producer- Parameters:
batchWithIndividualHeaders
- the value to set- Returns:
- the dsl builder
-
bufferMemorySize
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder bufferMemorySize(Integer bufferMemorySize)
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. The option is a: <code>java.lang.Integer</code> type. Default: 33554432 Group: producer- Parameters:
bufferMemorySize
- the value to set- Returns:
- the dsl builder
-
bufferMemorySize
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder bufferMemorySize(String bufferMemorySize)
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. The option will be converted to a <code>java.lang.Integer</code> type. Default: 33554432 Group: producer- Parameters:
bufferMemorySize
- the value to set- Returns:
- the dsl builder
-
compressionCodec
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder compressionCodec(String compressionCodec)
This parameter allows you to specify the compression codec for all data generated by this producer. Valid values are none, gzip and snappy. The option is a: <code>java.lang.String</code> type. Default: none Group: producer- Parameters:
compressionCodec
- the value to set- Returns:
- the dsl builder
-
connectionMaxIdleMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder connectionMaxIdleMs(Integer connectionMaxIdleMs)
Close idle connections after the number of milliseconds specified by this config. The option is a: <code>java.lang.Integer</code> type. Default: 540000 Group: producer- Parameters:
connectionMaxIdleMs
- the value to set- Returns:
- the dsl builder
-
connectionMaxIdleMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder connectionMaxIdleMs(String connectionMaxIdleMs)
Close idle connections after the number of milliseconds specified by this config. The option will be converted to a <code>java.lang.Integer</code> type. Default: 540000 Group: producer- Parameters:
connectionMaxIdleMs
- the value to set- Returns:
- the dsl builder
-
deliveryTimeoutMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder deliveryTimeoutMs(Integer deliveryTimeoutMs)
An upper bound on the time to report success or failure after a call to send() returns. This limits the total time that a record will be delayed prior to sending, the time to await acknowledgement from the broker (if expected), and the time allowed for retriable send failures. The option is a: <code>java.lang.Integer</code> type. Default: 120000 Group: producer- Parameters:
deliveryTimeoutMs
- the value to set- Returns:
- the dsl builder
-
deliveryTimeoutMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder deliveryTimeoutMs(String deliveryTimeoutMs)
An upper bound on the time to report success or failure after a call to send() returns. This limits the total time that a record will be delayed prior to sending, the time to await acknowledgement from the broker (if expected), and the time allowed for retriable send failures. The option will be converted to a <code>java.lang.Integer</code> type. Default: 120000 Group: producer- Parameters:
deliveryTimeoutMs
- the value to set- Returns:
- the dsl builder
-
enableIdempotence
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder enableIdempotence(boolean enableIdempotence)
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'. The option is a: <code>boolean</code> type. Default: false Group: producer- Parameters:
enableIdempotence
- the value to set- Returns:
- the dsl builder
-
enableIdempotence
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder enableIdempotence(String enableIdempotence)
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'. The option will be converted to a <code>boolean</code> type. Default: false Group: producer- Parameters:
enableIdempotence
- the value to set- Returns:
- the dsl builder
-
headerSerializer
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder headerSerializer(org.apache.camel.component.kafka.serde.KafkaHeaderSerializer headerSerializer)
To use a custom KafkaHeaderSerializer to serialize kafka headers values. The option is a: <code>org.apache.camel.component.kafka.serde.KafkaHeaderSerializer</code> type. Group: producer- Parameters:
headerSerializer
- the value to set- Returns:
- the dsl builder
-
headerSerializer
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder headerSerializer(String headerSerializer)
To use a custom KafkaHeaderSerializer to serialize kafka headers values. The option will be converted to a <code>org.apache.camel.component.kafka.serde.KafkaHeaderSerializer</code> type. Group: producer- Parameters:
headerSerializer
- the value to set- Returns:
- the dsl builder
-
key
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder key(String 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. The option is a: <code>java.lang.String</code> type. Group: producer- Parameters:
key
- the value to set- Returns:
- the dsl builder
-
keySerializer
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder keySerializer(String keySerializer)
The serializer class for keys (defaults to the same as for messages if nothing is given). The option is a: <code>java.lang.String</code> type. Default: org.apache.kafka.common.serialization.StringSerializer Group: producer- Parameters:
keySerializer
- the value to set- Returns:
- the dsl builder
-
lingerMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder lingerMs(Integer 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. The option is a: <code>java.lang.Integer</code> type. Default: 0 Group: producer- Parameters:
lingerMs
- the value to set- Returns:
- the dsl builder
-
lingerMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder lingerMs(String 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. The option will be converted to a <code>java.lang.Integer</code> type. Default: 0 Group: producer- Parameters:
lingerMs
- the value to set- Returns:
- the dsl builder
-
maxBlockMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder maxBlockMs(Integer maxBlockMs)
The configuration controls how long the KafkaProducer's send(), partitionsFor(), initTransactions(), sendOffsetsToTransaction(), commitTransaction() and abortTransaction() methods will block. For send() this timeout bounds the total time waiting for both metadata fetch and buffer allocation (blocking in the user-supplied serializers or partitioner is not counted against this timeout). For partitionsFor() this timeout bounds the time spent waiting for metadata if it is unavailable. The transaction-related methods always block, but may timeout if the transaction coordinator could not be discovered or did not respond within the timeout. The option is a: <code>java.lang.Integer</code> type. Default: 60000 Group: producer- Parameters:
maxBlockMs
- the value to set- Returns:
- the dsl builder
-
maxBlockMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder maxBlockMs(String maxBlockMs)
The configuration controls how long the KafkaProducer's send(), partitionsFor(), initTransactions(), sendOffsetsToTransaction(), commitTransaction() and abortTransaction() methods will block. For send() this timeout bounds the total time waiting for both metadata fetch and buffer allocation (blocking in the user-supplied serializers or partitioner is not counted against this timeout). For partitionsFor() this timeout bounds the time spent waiting for metadata if it is unavailable. The transaction-related methods always block, but may timeout if the transaction coordinator could not be discovered or did not respond within the timeout. The option will be converted to a <code>java.lang.Integer</code> type. Default: 60000 Group: producer- Parameters:
maxBlockMs
- the value to set- Returns:
- the dsl builder
-
maxInFlightRequest
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder maxInFlightRequest(Integer maxInFlightRequest)
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). The option is a: <code>java.lang.Integer</code> type. Default: 5 Group: producer- Parameters:
maxInFlightRequest
- the value to set- Returns:
- the dsl builder
-
maxInFlightRequest
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder maxInFlightRequest(String maxInFlightRequest)
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). The option will be converted to a <code>java.lang.Integer</code> type. Default: 5 Group: producer- Parameters:
maxInFlightRequest
- the value to set- Returns:
- the dsl builder
-
maxRequestSize
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder maxRequestSize(Integer maxRequestSize)
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. The option is a: <code>java.lang.Integer</code> type. Default: 1048576 Group: producer- Parameters:
maxRequestSize
- the value to set- Returns:
- the dsl builder
-
maxRequestSize
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder maxRequestSize(String maxRequestSize)
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. The option will be converted to a <code>java.lang.Integer</code> type. Default: 1048576 Group: producer- Parameters:
maxRequestSize
- the value to set- Returns:
- the dsl builder
-
metadataMaxAgeMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder metadataMaxAgeMs(Integer metadataMaxAgeMs)
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. The option is a: <code>java.lang.Integer</code> type. Default: 300000 Group: producer- Parameters:
metadataMaxAgeMs
- the value to set- Returns:
- the dsl builder
-
metadataMaxAgeMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder metadataMaxAgeMs(String metadataMaxAgeMs)
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. The option will be converted to a <code>java.lang.Integer</code> type. Default: 300000 Group: producer- Parameters:
metadataMaxAgeMs
- the value to set- Returns:
- the dsl builder
-
metricReporters
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder metricReporters(String metricReporters)
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. The option is a: <code>java.lang.String</code> type. Group: producer- Parameters:
metricReporters
- the value to set- Returns:
- the dsl builder
-
metricsSampleWindowMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder metricsSampleWindowMs(Integer metricsSampleWindowMs)
The window of time a metrics sample is computed over. The option is a: <code>java.lang.Integer</code> type. Default: 30000 Group: producer- Parameters:
metricsSampleWindowMs
- the value to set- Returns:
- the dsl builder
-
metricsSampleWindowMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder metricsSampleWindowMs(String metricsSampleWindowMs)
The window of time a metrics sample is computed over. The option will be converted to a <code>java.lang.Integer</code> type. Default: 30000 Group: producer- Parameters:
metricsSampleWindowMs
- the value to set- Returns:
- the dsl builder
-
noOfMetricsSample
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder noOfMetricsSample(Integer noOfMetricsSample)
The number of samples maintained to compute metrics. The option is a: <code>java.lang.Integer</code> type. Default: 2 Group: producer- Parameters:
noOfMetricsSample
- the value to set- Returns:
- the dsl builder
-
noOfMetricsSample
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder noOfMetricsSample(String noOfMetricsSample)
The number of samples maintained to compute metrics. The option will be converted to a <code>java.lang.Integer</code> type. Default: 2 Group: producer- Parameters:
noOfMetricsSample
- the value to set- Returns:
- the dsl builder
-
partitioner
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder partitioner(String partitioner)
The partitioner class for partitioning messages amongst sub-topics. The default partitioner is based on the hash of the key. The option is a: <code>java.lang.String</code> type. Default: org.apache.kafka.clients.producer.internals.DefaultPartitioner Group: producer- Parameters:
partitioner
- the value to set- Returns:
- the dsl builder
-
partitionKey
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder partitionKey(Integer partitionKey)
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. The option is a: <code>java.lang.Integer</code> type. Group: producer- Parameters:
partitionKey
- the value to set- Returns:
- the dsl builder
-
partitionKey
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder partitionKey(String partitionKey)
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. The option will be converted to a <code>java.lang.Integer</code> type. Group: producer- Parameters:
partitionKey
- the value to set- Returns:
- the dsl builder
-
producerBatchSize
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder producerBatchSize(Integer producerBatchSize)
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. The option is a: <code>java.lang.Integer</code> type. Default: 16384 Group: producer- Parameters:
producerBatchSize
- the value to set- Returns:
- the dsl builder
-
producerBatchSize
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder producerBatchSize(String producerBatchSize)
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. The option will be converted to a <code>java.lang.Integer</code> type. Default: 16384 Group: producer- Parameters:
producerBatchSize
- the value to set- Returns:
- the dsl builder
-
queueBufferingMaxMessages
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder queueBufferingMaxMessages(Integer queueBufferingMaxMessages)
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. The option is a: <code>java.lang.Integer</code> type. Default: 10000 Group: producer- Parameters:
queueBufferingMaxMessages
- the value to set- Returns:
- the dsl builder
-
queueBufferingMaxMessages
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder queueBufferingMaxMessages(String queueBufferingMaxMessages)
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. The option will be converted to a <code>java.lang.Integer</code> type. Default: 10000 Group: producer- Parameters:
queueBufferingMaxMessages
- the value to set- Returns:
- the dsl builder
-
receiveBufferBytes
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder receiveBufferBytes(Integer receiveBufferBytes)
The size of the TCP receive buffer (SO_RCVBUF) to use when reading data. The option is a: <code>java.lang.Integer</code> type. Default: 65536 Group: producer- Parameters:
receiveBufferBytes
- the value to set- Returns:
- the dsl builder
-
receiveBufferBytes
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder receiveBufferBytes(String receiveBufferBytes)
The size of the TCP receive buffer (SO_RCVBUF) to use when reading data. The option will be converted to a <code>java.lang.Integer</code> type. Default: 65536 Group: producer- Parameters:
receiveBufferBytes
- the value to set- Returns:
- the dsl builder
-
reconnectBackoffMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder reconnectBackoffMs(Integer reconnectBackoffMs)
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. The option is a: <code>java.lang.Integer</code> type. Default: 50 Group: producer- Parameters:
reconnectBackoffMs
- the value to set- Returns:
- the dsl builder
-
reconnectBackoffMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder reconnectBackoffMs(String reconnectBackoffMs)
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. The option will be converted to a <code>java.lang.Integer</code> type. Default: 50 Group: producer- Parameters:
reconnectBackoffMs
- the value to set- Returns:
- the dsl builder
-
recordMetadata
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder recordMetadata(boolean recordMetadata)
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. The option is a: <code>boolean</code> type. Default: true Group: producer- Parameters:
recordMetadata
- the value to set- Returns:
- the dsl builder
-
recordMetadata
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder recordMetadata(String recordMetadata)
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. The option will be converted to a <code>boolean</code> type. Default: true Group: producer- Parameters:
recordMetadata
- the value to set- Returns:
- the dsl builder
-
requestRequiredAcks
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder requestRequiredAcks(String requestRequiredAcks)
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. The option is a: <code>java.lang.String</code> type. Default: 1 Group: producer- Parameters:
requestRequiredAcks
- the value to set- Returns:
- the dsl builder
-
requestTimeoutMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder requestTimeoutMs(Integer requestTimeoutMs)
The amount of time the broker will wait trying to meet the request.required.acks requirement before sending back an error to the client. The option is a: <code>java.lang.Integer</code> type. Default: 30000 Group: producer- Parameters:
requestTimeoutMs
- the value to set- Returns:
- the dsl builder
-
requestTimeoutMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder requestTimeoutMs(String requestTimeoutMs)
The amount of time the broker will wait trying to meet the request.required.acks requirement before sending back an error to the client. The option will be converted to a <code>java.lang.Integer</code> type. Default: 30000 Group: producer- Parameters:
requestTimeoutMs
- the value to set- Returns:
- the dsl builder
-
retries
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder retries(Integer 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. The option is a: <code>java.lang.Integer</code> type. Default: 0 Group: producer- Parameters:
retries
- the value to set- Returns:
- the dsl builder
-
retries
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder retries(String 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. The option will be converted to a <code>java.lang.Integer</code> type. Default: 0 Group: producer- Parameters:
retries
- the value to set- Returns:
- the dsl builder
-
retryBackoffMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder retryBackoffMs(Integer retryBackoffMs)
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. The option is a: <code>java.lang.Integer</code> type. Default: 100 Group: producer- Parameters:
retryBackoffMs
- the value to set- Returns:
- the dsl builder
-
retryBackoffMs
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder retryBackoffMs(String retryBackoffMs)
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. The option will be converted to a <code>java.lang.Integer</code> type. Default: 100 Group: producer- Parameters:
retryBackoffMs
- the value to set- Returns:
- the dsl builder
-
sendBufferBytes
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sendBufferBytes(Integer sendBufferBytes)
Socket write buffer size. The option is a: <code>java.lang.Integer</code> type. Default: 131072 Group: producer- Parameters:
sendBufferBytes
- the value to set- Returns:
- the dsl builder
-
sendBufferBytes
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sendBufferBytes(String sendBufferBytes)
Socket write buffer size. The option will be converted to a <code>java.lang.Integer</code> type. Default: 131072 Group: producer- Parameters:
sendBufferBytes
- the value to set- Returns:
- the dsl builder
-
valueSerializer
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder valueSerializer(String valueSerializer)
The serializer class for messages. The option is a: <code>java.lang.String</code> type. Default: org.apache.kafka.common.serialization.StringSerializer Group: producer- Parameters:
valueSerializer
- the value to set- Returns:
- the dsl builder
-
workerPool
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder workerPool(ExecutorService 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. If using this option then you must handle the lifecycle of the thread pool to shut the pool down when no longer needed. The option is a: <code>java.util.concurrent.ExecutorService</code> type. Group: producer- Parameters:
workerPool
- the value to set- Returns:
- the dsl builder
-
workerPool
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder workerPool(String 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. If using this option then you must handle the lifecycle of the thread pool to shut the pool down when no longer needed. The option will be converted to a <code>java.util.concurrent.ExecutorService</code> type. Group: producer- Parameters:
workerPool
- the value to set- Returns:
- the dsl builder
-
workerPoolCoreSize
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder workerPoolCoreSize(Integer workerPoolCoreSize)
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. The option is a: <code>java.lang.Integer</code> type. Default: 10 Group: producer- Parameters:
workerPoolCoreSize
- the value to set- Returns:
- the dsl builder
-
workerPoolCoreSize
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder workerPoolCoreSize(String workerPoolCoreSize)
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. The option will be converted to a <code>java.lang.Integer</code> type. Default: 10 Group: producer- Parameters:
workerPoolCoreSize
- the value to set- Returns:
- the dsl builder
-
workerPoolMaxSize
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder workerPoolMaxSize(Integer workerPoolMaxSize)
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. The option is a: <code>java.lang.Integer</code> type. Default: 20 Group: producer- Parameters:
workerPoolMaxSize
- the value to set- Returns:
- the dsl builder
-
workerPoolMaxSize
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder workerPoolMaxSize(String workerPoolMaxSize)
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. The option will be converted to a <code>java.lang.Integer</code> type. Default: 20 Group: producer- Parameters:
workerPoolMaxSize
- the value to set- Returns:
- the dsl builder
-
schemaRegistryURL
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder schemaRegistryURL(String schemaRegistryURL)
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). The option is a: <code>java.lang.String</code> type. Group: confluent- Parameters:
schemaRegistryURL
- the value to set- Returns:
- the dsl builder
-
interceptorClasses
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder interceptorClasses(String interceptorClasses)
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. The option is a: <code>java.lang.String</code> type. Group: monitoring- Parameters:
interceptorClasses
- the value to set- Returns:
- the dsl builder
-
kerberosBeforeReloginMinTime
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder kerberosBeforeReloginMinTime(Integer kerberosBeforeReloginMinTime)
Login thread sleep time between refresh attempts. The option is a: <code>java.lang.Integer</code> type. Default: 60000 Group: security- Parameters:
kerberosBeforeReloginMinTime
- the value to set- Returns:
- the dsl builder
-
kerberosBeforeReloginMinTime
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder kerberosBeforeReloginMinTime(String kerberosBeforeReloginMinTime)
Login thread sleep time between refresh attempts. The option will be converted to a <code>java.lang.Integer</code> type. Default: 60000 Group: security- Parameters:
kerberosBeforeReloginMinTime
- the value to set- Returns:
- the dsl builder
-
kerberosInitCmd
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder kerberosInitCmd(String kerberosInitCmd)
Kerberos kinit command path. Default is /usr/bin/kinit. The option is a: <code>java.lang.String</code> type. Default: /usr/bin/kinit Group: security- Parameters:
kerberosInitCmd
- the value to set- Returns:
- the dsl builder
-
kerberosPrincipalToLocalRules
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder kerberosPrincipalToLocalRules(String kerberosPrincipalToLocalRules)
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 (at the Apache Kafka project). Multiple values can be separated by comma. The option is a: <code>java.lang.String</code> type. Default: DEFAULT Group: security- Parameters:
kerberosPrincipalToLocalRules
- the value to set- Returns:
- the dsl builder
-
kerberosRenewJitter
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder kerberosRenewJitter(Double kerberosRenewJitter)
Percentage of random jitter added to the renewal time. The option is a: <code>java.lang.Double</code> type. Default: 0.05 Group: security- Parameters:
kerberosRenewJitter
- the value to set- Returns:
- the dsl builder
-
kerberosRenewJitter
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder kerberosRenewJitter(String kerberosRenewJitter)
Percentage of random jitter added to the renewal time. The option will be converted to a <code>java.lang.Double</code> type. Default: 0.05 Group: security- Parameters:
kerberosRenewJitter
- the value to set- Returns:
- the dsl builder
-
kerberosRenewWindowFactor
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder kerberosRenewWindowFactor(Double kerberosRenewWindowFactor)
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. The option is a: <code>java.lang.Double</code> type. Default: 0.8 Group: security- Parameters:
kerberosRenewWindowFactor
- the value to set- Returns:
- the dsl builder
-
kerberosRenewWindowFactor
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder kerberosRenewWindowFactor(String kerberosRenewWindowFactor)
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. The option will be converted to a <code>java.lang.Double</code> type. Default: 0.8 Group: security- Parameters:
kerberosRenewWindowFactor
- the value to set- Returns:
- the dsl builder
-
saslJaasConfig
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder saslJaasConfig(String saslJaasConfig)
Expose the kafka sasl.jaas.config parameter Example: org.apache.kafka.common.security.plain.PlainLoginModule required username=USERNAME password=PASSWORD;. The option is a: <code>java.lang.String</code> type. Group: security- Parameters:
saslJaasConfig
- the value to set- Returns:
- the dsl builder
-
saslKerberosServiceName
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder saslKerberosServiceName(String saslKerberosServiceName)
The Kerberos principal name that Kafka runs as. This can be defined either in Kafka's JAAS config or in Kafka's config. The option is a: <code>java.lang.String</code> type. Group: security- Parameters:
saslKerberosServiceName
- the value to set- Returns:
- the dsl builder
-
saslMechanism
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder saslMechanism(String saslMechanism)
The Simple Authentication and Security Layer (SASL) Mechanism used. For the valid values see http://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml. The option is a: <code>java.lang.String</code> type. Default: GSSAPI Group: security- Parameters:
saslMechanism
- the value to set- Returns:
- the dsl builder
-
securityProtocol
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder securityProtocol(String securityProtocol)
Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT and SSL are supported. The option is a: <code>java.lang.String</code> type. Default: PLAINTEXT Group: security- Parameters:
securityProtocol
- the value to set- Returns:
- the dsl builder
-
sslCipherSuites
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sslCipherSuites(String sslCipherSuites)
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. The option is a: <code>java.lang.String</code> type. Group: security- Parameters:
sslCipherSuites
- the value to set- Returns:
- the dsl builder
-
sslContextParameters
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)
SSL configuration using a Camel SSLContextParameters object. If configured it's applied before the other SSL endpoint parameters. NOTE: Kafka only supports loading keystore from file locations, so prefix the location with file: in the KeyStoreParameters.resource option. The option is a: <code>org.apache.camel.support.jsse.SSLContextParameters</code> type. Group: security- Parameters:
sslContextParameters
- the value to set- Returns:
- the dsl builder
-
sslContextParameters
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sslContextParameters(String sslContextParameters)
SSL configuration using a Camel SSLContextParameters object. If configured it's applied before the other SSL endpoint parameters. NOTE: Kafka only supports loading keystore from file locations, so prefix the location with file: in the KeyStoreParameters.resource option. The option will be converted to a <code>org.apache.camel.support.jsse.SSLContextParameters</code> type. Group: security- Parameters:
sslContextParameters
- the value to set- Returns:
- the dsl builder
-
sslEnabledProtocols
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sslEnabledProtocols(String sslEnabledProtocols)
The list of protocols enabled for SSL connections. TLSv1.2, TLSv1.1 and TLSv1 are enabled by default. The option is a: <code>java.lang.String</code> type. Group: security- Parameters:
sslEnabledProtocols
- the value to set- Returns:
- the dsl builder
-
sslEndpointAlgorithm
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sslEndpointAlgorithm(String sslEndpointAlgorithm)
The endpoint identification algorithm to validate server hostname using server certificate. Use none or false to disable server hostname verification. The option is a: <code>java.lang.String</code> type. Default: https Group: security- Parameters:
sslEndpointAlgorithm
- the value to set- Returns:
- the dsl builder
-
sslKeymanagerAlgorithm
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sslKeymanagerAlgorithm(String sslKeymanagerAlgorithm)
The algorithm used by key manager factory for SSL connections. Default value is the key manager factory algorithm configured for the Java Virtual Machine. The option is a: <code>java.lang.String</code> type. Default: SunX509 Group: security- Parameters:
sslKeymanagerAlgorithm
- the value to set- Returns:
- the dsl builder
-
sslKeyPassword
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sslKeyPassword(String sslKeyPassword)
The password of the private key in the key store file. This is optional for client. The option is a: <code>java.lang.String</code> type. Group: security- Parameters:
sslKeyPassword
- the value to set- Returns:
- the dsl builder
-
sslKeystoreLocation
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sslKeystoreLocation(String sslKeystoreLocation)
The location of the key store file. This is optional for client and can be used for two-way authentication for client. The option is a: <code>java.lang.String</code> type. Group: security- Parameters:
sslKeystoreLocation
- the value to set- Returns:
- the dsl builder
-
sslKeystorePassword
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sslKeystorePassword(String sslKeystorePassword)
The store password for the key store file.This is optional for client and only needed if ssl.keystore.location is configured. The option is a: <code>java.lang.String</code> type. Group: security- Parameters:
sslKeystorePassword
- the value to set- Returns:
- the dsl builder
-
sslKeystoreType
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sslKeystoreType(String sslKeystoreType)
The file format of the key store file. This is optional for client. Default value is JKS. The option is a: <code>java.lang.String</code> type. Default: JKS Group: security- Parameters:
sslKeystoreType
- the value to set- Returns:
- the dsl builder
-
sslProtocol
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sslProtocol(String sslProtocol)
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. The option is a: <code>java.lang.String</code> type. Group: security- Parameters:
sslProtocol
- the value to set- Returns:
- the dsl builder
-
sslProvider
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sslProvider(String sslProvider)
The name of the security provider used for SSL connections. Default value is the default security provider of the JVM. The option is a: <code>java.lang.String</code> type. Group: security- Parameters:
sslProvider
- the value to set- Returns:
- the dsl builder
-
sslTrustmanagerAlgorithm
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sslTrustmanagerAlgorithm(String sslTrustmanagerAlgorithm)
The algorithm used by trust manager factory for SSL connections. Default value is the trust manager factory algorithm configured for the Java Virtual Machine. The option is a: <code>java.lang.String</code> type. Default: PKIX Group: security- Parameters:
sslTrustmanagerAlgorithm
- the value to set- Returns:
- the dsl builder
-
sslTruststoreLocation
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sslTruststoreLocation(String sslTruststoreLocation)
The location of the trust store file. The option is a: <code>java.lang.String</code> type. Group: security- Parameters:
sslTruststoreLocation
- the value to set- Returns:
- the dsl builder
-
sslTruststorePassword
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sslTruststorePassword(String sslTruststorePassword)
The password for the trust store file. The option is a: <code>java.lang.String</code> type. Group: security- Parameters:
sslTruststorePassword
- the value to set- Returns:
- the dsl builder
-
sslTruststoreType
default KafkaEndpointBuilderFactory.KafkaEndpointProducerBuilder sslTruststoreType(String sslTruststoreType)
The file format of the trust store file. Default value is JKS. The option is a: <code>java.lang.String</code> type. Default: JKS Group: security- Parameters:
sslTruststoreType
- the value to set- Returns:
- the dsl builder
-
-