Interface KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder

All Superinterfaces:
org.apache.camel.builder.EndpointConsumerBuilder, org.apache.camel.EndpointConsumerResolver
All Known Subinterfaces:
KafkaEndpointBuilderFactory.KafkaEndpointBuilder
Enclosing interface:
KafkaEndpointBuilderFactory

public static interface KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder extends org.apache.camel.builder.EndpointConsumerBuilder
Builder for endpoint consumers for the Kafka component.
  • Method Details

    • advanced

    • additionalProperties

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder 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&amp;additionalProperties.schema.registry.url=http://localhost:8811/avro. The option is a: <code>java.util.Map&lt;java.lang.String, java.lang.Object&gt;</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 key
      value - the option value
      Returns:
      the dsl builder
    • additionalProperties

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder 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&amp;additionalProperties.schema.registry.url=http://localhost:8811/avro. The option is a: <code>java.util.Map&lt;java.lang.String, java.lang.Object&gt;</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

      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

      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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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
    • allowManualCommit

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder allowManualCommit(boolean allowManualCommit)
      Whether to allow doing manual commits via KafkaManualCommit. If this option is enabled then an instance of KafkaManualCommit is stored on the Exchange message header, which allows end users to access this API and perform manual offset commits via the Kafka consumer. The option is a: <code>boolean</code> type. Default: false Group: consumer
      Parameters:
      allowManualCommit - the value to set
      Returns:
      the dsl builder
    • allowManualCommit

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder allowManualCommit(String allowManualCommit)
      Whether to allow doing manual commits via KafkaManualCommit. If this option is enabled then an instance of KafkaManualCommit is stored on the Exchange message header, which allows end users to access this API and perform manual offset commits via the Kafka consumer. The option will be converted to a <code>boolean</code> type. Default: false Group: consumer
      Parameters:
      allowManualCommit - the value to set
      Returns:
      the dsl builder
    • autoCommitEnable

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder autoCommitEnable(boolean autoCommitEnable)
      If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer. This committed offset will be used when the process fails as the position from which the new consumer will begin. The option is a: <code>boolean</code> type. Default: true Group: consumer
      Parameters:
      autoCommitEnable - the value to set
      Returns:
      the dsl builder
    • autoCommitEnable

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder autoCommitEnable(String autoCommitEnable)
      If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer. This committed offset will be used when the process fails as the position from which the new consumer will begin. The option will be converted to a <code>boolean</code> type. Default: true Group: consumer
      Parameters:
      autoCommitEnable - the value to set
      Returns:
      the dsl builder
    • autoCommitIntervalMs

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder autoCommitIntervalMs(Integer autoCommitIntervalMs)
      The frequency in ms that the consumer offsets are committed to zookeeper. The option is a: <code>java.lang.Integer</code> type. Default: 5000 Group: consumer
      Parameters:
      autoCommitIntervalMs - the value to set
      Returns:
      the dsl builder
    • autoCommitIntervalMs

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder autoCommitIntervalMs(String autoCommitIntervalMs)
      The frequency in ms that the consumer offsets are committed to zookeeper. The option will be converted to a <code>java.lang.Integer</code> type. Default: 5000 Group: consumer
      Parameters:
      autoCommitIntervalMs - the value to set
      Returns:
      the dsl builder
    • autoOffsetReset

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder autoOffsetReset(String autoOffsetReset)
      What to do when there is no initial offset in ZooKeeper or if an offset is out of range: earliest : automatically reset the offset to the earliest offset latest : automatically reset the offset to the latest offset fail: throw exception to the consumer. The option is a: <code>java.lang.String</code> type. Default: latest Group: consumer
      Parameters:
      autoOffsetReset - the value to set
      Returns:
      the dsl builder
    • breakOnFirstError

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder breakOnFirstError(boolean breakOnFirstError)
      This options controls what happens when a consumer is processing an exchange and it fails. If the option is false then the consumer continues to the next message and processes it. If the option is true then the consumer breaks out, and will seek back to offset of the message that caused a failure, and then re-attempt to process this message. However this can lead to endless processing of the same message if its bound to fail every time, eg a poison message. Therefore it is recommended to deal with that for example by using Camel's error handler. The option is a: <code>boolean</code> type. Default: false Group: consumer
      Parameters:
      breakOnFirstError - the value to set
      Returns:
      the dsl builder
    • breakOnFirstError

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder breakOnFirstError(String breakOnFirstError)
      This options controls what happens when a consumer is processing an exchange and it fails. If the option is false then the consumer continues to the next message and processes it. If the option is true then the consumer breaks out, and will seek back to offset of the message that caused a failure, and then re-attempt to process this message. However this can lead to endless processing of the same message if its bound to fail every time, eg a poison message. Therefore it is recommended to deal with that for example by using Camel's error handler. The option will be converted to a <code>boolean</code> type. Default: false Group: consumer
      Parameters:
      breakOnFirstError - the value to set
      Returns:
      the dsl builder
    • checkCrcs

      Automatically check the CRC32 of the records consumed. This ensures no on-the-wire or on-disk corruption to the messages occurred. This check adds some overhead, so it may be disabled in cases seeking extreme performance. The option is a: <code>java.lang.Boolean</code> type. Default: true Group: consumer
      Parameters:
      checkCrcs - the value to set
      Returns:
      the dsl builder
    • checkCrcs

      Automatically check the CRC32 of the records consumed. This ensures no on-the-wire or on-disk corruption to the messages occurred. This check adds some overhead, so it may be disabled in cases seeking extreme performance. The option will be converted to a <code>java.lang.Boolean</code> type. Default: true Group: consumer
      Parameters:
      checkCrcs - the value to set
      Returns:
      the dsl builder
    • commitTimeoutMs

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder commitTimeoutMs(Long commitTimeoutMs)
      The maximum time, in milliseconds, that the code will wait for a synchronous commit to complete. The option is a: <code>java.lang.Long</code> type. Default: 5000 Group: consumer
      Parameters:
      commitTimeoutMs - the value to set
      Returns:
      the dsl builder
    • commitTimeoutMs

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder commitTimeoutMs(String commitTimeoutMs)
      The maximum time, in milliseconds, that the code will wait for a synchronous commit to complete. The option will be converted to a <code>java.lang.Long</code> type. Default: 5000 Group: consumer
      Parameters:
      commitTimeoutMs - the value to set
      Returns:
      the dsl builder
    • consumerRequestTimeoutMs

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder consumerRequestTimeoutMs(Integer consumerRequestTimeoutMs)
      The configuration controls the maximum amount of time the client will wait for the response of a request. If the response is not received before the timeout elapses the client will resend the request if necessary or fail the request if retries are exhausted. The option is a: <code>java.lang.Integer</code> type. Default: 30000 Group: consumer
      Parameters:
      consumerRequestTimeoutMs - the value to set
      Returns:
      the dsl builder
    • consumerRequestTimeoutMs

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder consumerRequestTimeoutMs(String consumerRequestTimeoutMs)
      The configuration controls the maximum amount of time the client will wait for the response of a request. If the response is not received before the timeout elapses the client will resend the request if necessary or fail the request if retries are exhausted. The option will be converted to a <code>java.lang.Integer</code> type. Default: 30000 Group: consumer
      Parameters:
      consumerRequestTimeoutMs - the value to set
      Returns:
      the dsl builder
    • consumersCount

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder consumersCount(int consumersCount)
      The number of consumers that connect to kafka server. Each consumer is run on a separate thread, that retrieves and process the incoming data. The option is a: <code>int</code> type. Default: 1 Group: consumer
      Parameters:
      consumersCount - the value to set
      Returns:
      the dsl builder
    • consumersCount

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder consumersCount(String consumersCount)
      The number of consumers that connect to kafka server. Each consumer is run on a separate thread, that retrieves and process the incoming data. The option will be converted to a <code>int</code> type. Default: 1 Group: consumer
      Parameters:
      consumersCount - the value to set
      Returns:
      the dsl builder
    • fetchMaxBytes

      The maximum amount of data the server should return for a fetch request This is not an absolute maximum, if the first message in the first non-empty partition of the fetch is larger than this value, the message will still be returned to ensure that the consumer can make progress. The maximum message size accepted by the broker is defined via message.max.bytes (broker config) or max.message.bytes (topic config). Note that the consumer performs multiple fetches in parallel. The option is a: <code>java.lang.Integer</code> type. Default: 52428800 Group: consumer
      Parameters:
      fetchMaxBytes - the value to set
      Returns:
      the dsl builder
    • fetchMaxBytes

      The maximum amount of data the server should return for a fetch request This is not an absolute maximum, if the first message in the first non-empty partition of the fetch is larger than this value, the message will still be returned to ensure that the consumer can make progress. The maximum message size accepted by the broker is defined via message.max.bytes (broker config) or max.message.bytes (topic config). Note that the consumer performs multiple fetches in parallel. The option will be converted to a <code>java.lang.Integer</code> type. Default: 52428800 Group: consumer
      Parameters:
      fetchMaxBytes - the value to set
      Returns:
      the dsl builder
    • fetchMinBytes

      The minimum amount of data the server should return for a fetch request. If insufficient data is available the request will wait for that much data to accumulate before answering the request. The option is a: <code>java.lang.Integer</code> type. Default: 1 Group: consumer
      Parameters:
      fetchMinBytes - the value to set
      Returns:
      the dsl builder
    • fetchMinBytes

      The minimum amount of data the server should return for a fetch request. If insufficient data is available the request will wait for that much data to accumulate before answering the request. The option will be converted to a <code>java.lang.Integer</code> type. Default: 1 Group: consumer
      Parameters:
      fetchMinBytes - the value to set
      Returns:
      the dsl builder
    • fetchWaitMaxMs

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder fetchWaitMaxMs(Integer fetchWaitMaxMs)
      The maximum amount of time the server will block before answering the fetch request if there isn't sufficient data to immediately satisfy fetch.min.bytes. The option is a: <code>java.lang.Integer</code> type. Default: 500 Group: consumer
      Parameters:
      fetchWaitMaxMs - the value to set
      Returns:
      the dsl builder
    • fetchWaitMaxMs

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder fetchWaitMaxMs(String fetchWaitMaxMs)
      The maximum amount of time the server will block before answering the fetch request if there isn't sufficient data to immediately satisfy fetch.min.bytes. The option will be converted to a <code>java.lang.Integer</code> type. Default: 500 Group: consumer
      Parameters:
      fetchWaitMaxMs - the value to set
      Returns:
      the dsl builder
    • groupId

      A string that uniquely identifies the group of consumer processes to which this consumer belongs. By setting the same group id multiple processes indicate that they are all part of the same consumer group. This option is required for consumers. The option is a: <code>java.lang.String</code> type. Group: consumer
      Parameters:
      groupId - the value to set
      Returns:
      the dsl builder
    • groupInstanceId

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder groupInstanceId(String groupInstanceId)
      A unique identifier of the consumer instance provided by the end user. Only non-empty strings are permitted. If set, the consumer is treated as a static member, which means that only one instance with this ID is allowed in the consumer group at any time. This can be used in combination with a larger session timeout to avoid group rebalances caused by transient unavailability (e.g. process restarts). If not set, the consumer will join the group as a dynamic member, which is the traditional behavior. The option is a: <code>java.lang.String</code> type. Group: consumer
      Parameters:
      groupInstanceId - the value to set
      Returns:
      the dsl builder
    • headerDeserializer

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder headerDeserializer(org.apache.camel.component.kafka.serde.KafkaHeaderDeserializer headerDeserializer)
      To use a custom KafkaHeaderDeserializer to deserialize kafka headers values. The option is a: <code>org.apache.camel.component.kafka.serde.KafkaHeaderDeserializer</code> type. Group: consumer
      Parameters:
      headerDeserializer - the value to set
      Returns:
      the dsl builder
    • headerDeserializer

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder headerDeserializer(String headerDeserializer)
      To use a custom KafkaHeaderDeserializer to deserialize kafka headers values. The option will be converted to a <code>org.apache.camel.component.kafka.serde.KafkaHeaderDeserializer</code> type. Group: consumer
      Parameters:
      headerDeserializer - the value to set
      Returns:
      the dsl builder
    • heartbeatIntervalMs

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder heartbeatIntervalMs(Integer heartbeatIntervalMs)
      The expected time between heartbeats to the consumer coordinator when using Kafka's group management facilities. Heartbeats are used to ensure that the consumer's session stays active and to facilitate rebalancing when new consumers join or leave the group. The value must be set lower than session.timeout.ms, but typically should be set no higher than 1/3 of that value. It can be adjusted even lower to control the expected time for normal rebalances. The option is a: <code>java.lang.Integer</code> type. Default: 3000 Group: consumer
      Parameters:
      heartbeatIntervalMs - the value to set
      Returns:
      the dsl builder
    • heartbeatIntervalMs

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder heartbeatIntervalMs(String heartbeatIntervalMs)
      The expected time between heartbeats to the consumer coordinator when using Kafka's group management facilities. Heartbeats are used to ensure that the consumer's session stays active and to facilitate rebalancing when new consumers join or leave the group. The value must be set lower than session.timeout.ms, but typically should be set no higher than 1/3 of that value. It can be adjusted even lower to control the expected time for normal rebalances. The option will be converted to a <code>java.lang.Integer</code> type. Default: 3000 Group: consumer
      Parameters:
      heartbeatIntervalMs - the value to set
      Returns:
      the dsl builder
    • keyDeserializer

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder keyDeserializer(String keyDeserializer)
      Deserializer class for the key that implements the Deserializer interface. The option is a: <code>java.lang.String</code> type. Default: org.apache.kafka.common.serialization.StringDeserializer Group: consumer
      Parameters:
      keyDeserializer - the value to set
      Returns:
      the dsl builder
    • maxPartitionFetchBytes

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder maxPartitionFetchBytes(Integer maxPartitionFetchBytes)
      The maximum amount of data per-partition the server will return. The maximum total memory used for a request will be #partitions max.partition.fetch.bytes. This size must be at least as large as the maximum message size the server allows or else it is possible for the producer to send messages larger than the consumer can fetch. If that happens, the consumer can get stuck trying to fetch a large message on a certain partition. The option is a: <code>java.lang.Integer</code> type. Default: 1048576 Group: consumer
      Parameters:
      maxPartitionFetchBytes - the value to set
      Returns:
      the dsl builder
    • maxPartitionFetchBytes

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder maxPartitionFetchBytes(String maxPartitionFetchBytes)
      The maximum amount of data per-partition the server will return. The maximum total memory used for a request will be #partitions max.partition.fetch.bytes. This size must be at least as large as the maximum message size the server allows or else it is possible for the producer to send messages larger than the consumer can fetch. If that happens, the consumer can get stuck trying to fetch a large message on a certain partition. The option will be converted to a <code>java.lang.Integer</code> type. Default: 1048576 Group: consumer
      Parameters:
      maxPartitionFetchBytes - the value to set
      Returns:
      the dsl builder
    • maxPollIntervalMs

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder maxPollIntervalMs(Integer maxPollIntervalMs)
      The maximum delay between invocations of poll() when using consumer group management. This places an upper bound on the amount of time that the consumer can be idle before fetching more records. If poll() is not called before expiration of this timeout, then the consumer is considered failed and the group will rebalance in order to reassign the partitions to another member. The option is a: <code>java.lang.Integer</code> type. Group: consumer
      Parameters:
      maxPollIntervalMs - the value to set
      Returns:
      the dsl builder
    • maxPollIntervalMs

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder maxPollIntervalMs(String maxPollIntervalMs)
      The maximum delay between invocations of poll() when using consumer group management. This places an upper bound on the amount of time that the consumer can be idle before fetching more records. If poll() is not called before expiration of this timeout, then the consumer is considered failed and the group will rebalance in order to reassign the partitions to another member. The option will be converted to a <code>java.lang.Integer</code> type. Group: consumer
      Parameters:
      maxPollIntervalMs - the value to set
      Returns:
      the dsl builder
    • maxPollRecords

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder maxPollRecords(Integer maxPollRecords)
      The maximum number of records returned in a single call to poll(). The option is a: <code>java.lang.Integer</code> type. Default: 500 Group: consumer
      Parameters:
      maxPollRecords - the value to set
      Returns:
      the dsl builder
    • maxPollRecords

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder maxPollRecords(String maxPollRecords)
      The maximum number of records returned in a single call to poll(). The option will be converted to a <code>java.lang.Integer</code> type. Default: 500 Group: consumer
      Parameters:
      maxPollRecords - the value to set
      Returns:
      the dsl builder
    • offsetRepository

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder offsetRepository(org.apache.camel.spi.StateRepository<String,String> offsetRepository)
      The offset repository to use in order to locally store the offset of each partition of the topic. Defining one will disable the autocommit. The option is a: <code>org.apache.camel.spi.StateRepository&lt;java.lang.String, java.lang.String&gt;</code> type. Group: consumer
      Parameters:
      offsetRepository - the value to set
      Returns:
      the dsl builder
    • offsetRepository

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder offsetRepository(String offsetRepository)
      The offset repository to use in order to locally store the offset of each partition of the topic. Defining one will disable the autocommit. The option will be converted to a <code>org.apache.camel.spi.StateRepository&lt;java.lang.String, java.lang.String&gt;</code> type. Group: consumer
      Parameters:
      offsetRepository - the value to set
      Returns:
      the dsl builder
    • partitionAssignor

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder partitionAssignor(String partitionAssignor)
      The class name of the partition assignment strategy that the client will use to distribute partition ownership amongst consumer instances when group management is used. The option is a: <code>java.lang.String</code> type. Default: org.apache.kafka.clients.consumer.RangeAssignor Group: consumer
      Parameters:
      partitionAssignor - the value to set
      Returns:
      the dsl builder
    • pollOnError

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder pollOnError(org.apache.camel.component.kafka.PollOnError pollOnError)
      What to do if kafka threw an exception while polling for new messages. Will by default use the value from the component configuration unless an explicit value has been configured on the endpoint level. DISCARD will discard the message and continue to poll next message. ERROR_HANDLER will use Camel's error handler to process the exception, and afterwards continue to poll next message. RECONNECT will re-connect the consumer and try poll the message again RETRY will let the consumer retry polling the same message again STOP will stop the consumer (have to be manually started/restarted if the consumer should be able to consume messages again). The option is a: <code>org.apache.camel.component.kafka.PollOnError</code> type. Default: ERROR_HANDLER Group: consumer
      Parameters:
      pollOnError - the value to set
      Returns:
      the dsl builder
    • pollOnError

      What to do if kafka threw an exception while polling for new messages. Will by default use the value from the component configuration unless an explicit value has been configured on the endpoint level. DISCARD will discard the message and continue to poll next message. ERROR_HANDLER will use Camel's error handler to process the exception, and afterwards continue to poll next message. RECONNECT will re-connect the consumer and try poll the message again RETRY will let the consumer retry polling the same message again STOP will stop the consumer (have to be manually started/restarted if the consumer should be able to consume messages again). The option will be converted to a <code>org.apache.camel.component.kafka.PollOnError</code> type. Default: ERROR_HANDLER Group: consumer
      Parameters:
      pollOnError - the value to set
      Returns:
      the dsl builder
    • pollTimeoutMs

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder pollTimeoutMs(Long pollTimeoutMs)
      The timeout used when polling the KafkaConsumer. The option is a: <code>java.lang.Long</code> type. Default: 5000 Group: consumer
      Parameters:
      pollTimeoutMs - the value to set
      Returns:
      the dsl builder
    • pollTimeoutMs

      The timeout used when polling the KafkaConsumer. The option will be converted to a <code>java.lang.Long</code> type. Default: 5000 Group: consumer
      Parameters:
      pollTimeoutMs - the value to set
      Returns:
      the dsl builder
    • seekTo

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder seekTo(org.apache.camel.component.kafka.SeekPolicy seekTo)
      Set if KafkaConsumer will read from the beginning or the end on startup: SeekPolicy.BEGINNING: read from the beginning. SeekPolicy.END: read from the end. The option is a: <code>org.apache.camel.component.kafka.SeekPolicy</code> type. Group: consumer
      Parameters:
      seekTo - the value to set
      Returns:
      the dsl builder
    • seekTo

      Set if KafkaConsumer will read from the beginning or the end on startup: SeekPolicy.BEGINNING: read from the beginning. SeekPolicy.END: read from the end. The option will be converted to a <code>org.apache.camel.component.kafka.SeekPolicy</code> type. Group: consumer
      Parameters:
      seekTo - the value to set
      Returns:
      the dsl builder
    • sessionTimeoutMs

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder sessionTimeoutMs(Integer sessionTimeoutMs)
      The timeout used to detect failures when using Kafka's group management facilities. The option is a: <code>java.lang.Integer</code> type. Default: 45000 Group: consumer
      Parameters:
      sessionTimeoutMs - the value to set
      Returns:
      the dsl builder
    • sessionTimeoutMs

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder sessionTimeoutMs(String sessionTimeoutMs)
      The timeout used to detect failures when using Kafka's group management facilities. The option will be converted to a <code>java.lang.Integer</code> type. Default: 45000 Group: consumer
      Parameters:
      sessionTimeoutMs - the value to set
      Returns:
      the dsl builder
    • specificAvroReader

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder specificAvroReader(boolean specificAvroReader)
      This enables the use of a specific Avro reader for use with the Confluent Platform schema registry and the io.confluent.kafka.serializers.KafkaAvroDeserializer. This option is only available in the Confluent Platform (not standard Apache Kafka). The option is a: <code>boolean</code> type. Default: false Group: consumer
      Parameters:
      specificAvroReader - the value to set
      Returns:
      the dsl builder
    • specificAvroReader

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder specificAvroReader(String specificAvroReader)
      This enables the use of a specific Avro reader for use with the Confluent Platform schema registry and the io.confluent.kafka.serializers.KafkaAvroDeserializer. This option is only available in the Confluent Platform (not standard Apache Kafka). The option will be converted to a <code>boolean</code> type. Default: false Group: consumer
      Parameters:
      specificAvroReader - the value to set
      Returns:
      the dsl builder
    • topicIsPattern

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder topicIsPattern(boolean topicIsPattern)
      Whether the topic is a pattern (regular expression). This can be used to subscribe to dynamic number of topics matching the pattern. The option is a: <code>boolean</code> type. Default: false Group: consumer
      Parameters:
      topicIsPattern - the value to set
      Returns:
      the dsl builder
    • topicIsPattern

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder topicIsPattern(String topicIsPattern)
      Whether the topic is a pattern (regular expression). This can be used to subscribe to dynamic number of topics matching the pattern. The option will be converted to a <code>boolean</code> type. Default: false Group: consumer
      Parameters:
      topicIsPattern - the value to set
      Returns:
      the dsl builder
    • valueDeserializer

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder valueDeserializer(String valueDeserializer)
      Deserializer class for value that implements the Deserializer interface. The option is a: <code>java.lang.String</code> type. Default: org.apache.kafka.common.serialization.StringDeserializer Group: consumer
      Parameters:
      valueDeserializer - the value to set
      Returns:
      the dsl builder
    • schemaRegistryURL

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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
    • kerberosConfigLocation

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder kerberosConfigLocation(String kerberosConfigLocation)
      Location of the kerberos config file. The option is a: <code>java.lang.String</code> type. Group: security
      Parameters:
      kerberosConfigLocation - the value to set
      Returns:
      the dsl builder
    • kerberosInitCmd

      default KafkaEndpointBuilderFactory.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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

      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.KafkaEndpointConsumerBuilder securityProtocol(String securityProtocol)
      Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder sslEnabledProtocols(String sslEnabledProtocols)
      The list of protocols enabled for SSL connections. The default is TLSv1.2,TLSv1.3 when running with Java 11 or newer, TLSv1.2 otherwise. With the default value for Java 11, clients and servers will prefer TLSv1.3 if both support it and fallback to TLSv1.2 otherwise (assuming both support at least TLSv1.2). This default should be fine for most cases. Also see the config documentation for SslProtocol. 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder sslKeyPassword(String sslKeyPassword)
      The password of the private key in the key store file or the PEM key specified in sslKeystoreKey. This is required for clients only if two-way authentication is configured. 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.KafkaEndpointConsumerBuilder sslKeystoreLocation(String sslKeystoreLocation)
      The location of the key store file. This is optional for the client and can be used for two-way authentication for the 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.KafkaEndpointConsumerBuilder sslKeystorePassword(String sslKeystorePassword)
      The store password for the key store file. This is optional for the client and only needed if sslKeystoreLocation' is configured. Key store password is not supported for PEM format. 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.KafkaEndpointConsumerBuilder 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

      The SSL protocol used to generate the SSLContext. The default is TLSv1.3 when running with Java 11 or newer, TLSv1.2 otherwise. This value should be fine for most use cases. Allowed values in recent JVMs are TLSv1.2 and TLSv1.3. TLS, TLSv1.1, SSL, SSLv2 and SSLv3 may be supported in older JVMs, but their usage is discouraged due to known security vulnerabilities. With the default value for this config and sslEnabledProtocols, clients will downgrade to TLSv1.2 if the server does not support TLSv1.3. If this config is set to TLSv1.2, clients will not use TLSv1.3 even if it is one of the values in sslEnabledProtocols and the server only supports TLSv1.3. The option is a: <code>java.lang.String</code> type. Group: security
      Parameters:
      sslProtocol - the value to set
      Returns:
      the dsl builder
    • 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder 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.KafkaEndpointConsumerBuilder sslTruststorePassword(String sslTruststorePassword)
      The password for the trust store file. If a password is not set, trust store file configured will still be used, but integrity checking is disabled. Trust store password is not supported for PEM format. 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.KafkaEndpointConsumerBuilder 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