Class KafkaConnectorIncomingConfiguration
java.lang.Object
io.smallrye.reactive.messaging.kafka.KafkaConnectorCommonConfiguration
io.smallrye.reactive.messaging.kafka.KafkaConnectorIncomingConfiguration
Extract the incoming configuration for the
smallrye-kafka connector.-
Field Summary
Fields inherited from class io.smallrye.reactive.messaging.kafka.KafkaConnectorCommonConfiguration
config -
Constructor Summary
ConstructorsConstructorDescriptionKafkaConnectorIncomingConfiguration(org.eclipse.microprofile.config.Config config) Creates a new KafkaConnectorIncomingConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionGets the assign-seek value from the configuration.Gets the auto.offset.reset value from the configuration.getBatch()Gets the batch value from the configuration.Gets the broadcast value from the configuration.Gets the checkpoint.state-store value from the configuration.Gets the checkpoint.state-type value from the configuration.Gets the checkpoint.unsynced-state-max-age.ms value from the configuration.Gets the commit-strategy value from the configuration.Gets the consumer-rebalance-listener.name value from the configuration.Gets the dead-letter-queue.key.serializer value from the configuration.Gets the dead-letter-queue.producer-client-id value from the configuration.Gets the dead-letter-queue.topic value from the configuration.Gets the dead-letter-queue.value.serializer value from the configuration.Gets the delayed-retry-topic.max-retries value from the configuration.Gets the delayed-retry-topic.timeout value from the configuration.Gets the delayed-retry-topic.topics value from the configuration.Gets the enable.auto.commit value from the configuration.Gets the fail-on-deserialization-failure value from the configuration.Gets the failure-strategy value from the configuration.Gets the fetch.min.bytes value from the configuration.Gets the graceful-shutdown value from the configuration.Gets the group.id value from the configuration.Gets the key-deserialization-failure-handler value from the configuration.Gets the key.deserializer value from the configuration.Gets the max-queue-size-factor value from the configuration.Gets the partitions value from the configuration.Gets the pattern value from the configuration.Gets the pause-if-no-requests value from the configuration.Gets the poll-timeout value from the configuration.Gets the requests value from the configuration.getRetry()Gets the retry value from the configuration.Gets the retry-attempts value from the configuration.Gets the retry-max-wait value from the configuration.Gets the throttled.unprocessed-record-max-age.ms value from the configuration.Gets the topics value from the configuration.Gets the value-deserialization-failure-handler value from the configuration.Gets the value.deserializer value from the configuration.voidvalidate()Methods inherited from class io.smallrye.reactive.messaging.kafka.KafkaConnectorCommonConfiguration
config, getBootstrapServers, getChannel, getClientIdPrefix, getCloudEvents, getFromAlias, getFromAliasWithDefaultValue, getHealthEnabled, getHealthReadinessEnabled, getHealthReadinessTimeout, getHealthReadinessTopicVerification, getHealthTopicVerificationEnabled, getHealthTopicVerificationReadinessDisabled, getHealthTopicVerificationStartupDisabled, getHealthTopicVerificationTimeout, getKafkaConfiguration, getLazyClient, getTopic, getTracingEnabled
-
Constructor Details
-
KafkaConnectorIncomingConfiguration
public KafkaConnectorIncomingConfiguration(org.eclipse.microprofile.config.Config config) Creates a new KafkaConnectorIncomingConfiguration.
-
-
Method Details
-
getTopics
Gets the topics value from the configuration. Attribute Name: topics Description: A comma-separating list of topics to be consumed. Cannot be used with the `topic` or `pattern` properties- Returns:
- the topics
-
getPattern
Gets the pattern value from the configuration. Attribute Name: pattern Description: Indicate that the `topic` property is a regular expression. Must be used with the `topic` property. Cannot be used with the `topics` property Default Value: false- Returns:
- the pattern
-
getAssignSeek
Gets the assign-seek value from the configuration. Attribute Name: assign-seek Description: Assign partitions and optionally seek to offsets, instead of subscribing to topics. A comma-separating list of triplets in form of `:| |: ` to assign statically to the consumer and seek to the given offsets. Offset `0` seeks to beginning and offset `-1` seeks to the end of the topic-partition. If the topic is omitted the configured topic will be used. If the offset is omitted partitions are assigned to the consumer but won't be seeked to offset. - Returns:
- the assign-seek
-
getKeyDeserializer
Gets the key.deserializer value from the configuration. Attribute Name: key.deserializer Description: The deserializer classname used to deserialize the record's key Default Value: org.apache.kafka.common.serialization.StringDeserializer- Returns:
- the key.deserializer
-
getValueDeserializer
Gets the value.deserializer value from the configuration. Attribute Name: value.deserializer Description: The deserializer classname used to deserialize the record's value Mandatory: yes- Returns:
- the value.deserializer
-
getFetchMinBytes
Gets the fetch.min.bytes value from the configuration. Attribute Name: fetch.min.bytes Description: The minimum amount of data the server should return for a fetch request. The default setting of 1 byte means that fetch requests are answered as soon as a single byte of data is available or the fetch request times out waiting for data to arrive. Default Value: 1- Returns:
- the fetch.min.bytes
-
getGroupId
Gets the group.id value from the configuration. Attribute Name: group.id Description: A unique string that identifies the consumer group the application belongs to. If not set, a unique, generated id is used- Returns:
- the group.id
-
getEnableAutoCommit
Gets the enable.auto.commit value from the configuration. Attribute Name: enable.auto.commit Description: If enabled, consumer's offset will be periodically committed in the background by the underlying Kafka client, ignoring the actual processing outcome of the records. It is recommended to NOT enable this setting and let Reactive Messaging handles the commit. Default Value: false- Returns:
- the enable.auto.commit
-
getRetry
Gets the retry value from the configuration. Attribute Name: retry Description: Whether or not the connection to the broker is re-attempted in case of failure Default Value: true- Returns:
- the retry
-
getRetryAttempts
Gets the retry-attempts value from the configuration. Attribute Name: retry-attempts Description: The maximum number of reconnection before failing. -1 means infinite retry Default Value: -1- Returns:
- the retry-attempts
-
getRetryMaxWait
Gets the retry-max-wait value from the configuration. Attribute Name: retry-max-wait Description: The max delay (in seconds) between 2 reconnects Default Value: 30- Returns:
- the retry-max-wait
-
getBroadcast
Gets the broadcast value from the configuration. Attribute Name: broadcast Description: Whether the Kafka records should be dispatched to multiple consumer Default Value: false- Returns:
- the broadcast
-
getAutoOffsetReset
Gets the auto.offset.reset value from the configuration. Attribute Name: auto.offset.reset Description: What to do when there is no initial offset in Kafka.Accepted values are earliest, latest and none Default Value: latest- Returns:
- the auto.offset.reset
-
getFailureStrategy
Gets the failure-strategy value from the configuration. Attribute Name: failure-strategy Description: Specify the failure strategy to apply when a message produced from a record is acknowledged negatively (nack). Values can be `fail` (default), `ignore`, or `dead-letter-queue` Default Value: fail- Returns:
- the failure-strategy
-
getCommitStrategy
Gets the commit-strategy value from the configuration. Attribute Name: commit-strategy Description: Specify the commit strategy to apply when a message produced from a record is acknowledged. Values can be `latest`, `ignore` or `throttled`. If `enable.auto.commit` is true then the default is `ignore` otherwise it is `throttled`- Returns:
- the commit-strategy
-
getThrottledUnprocessedRecordMaxAgeMs
Gets the throttled.unprocessed-record-max-age.ms value from the configuration. Attribute Name: throttled.unprocessed-record-max-age.ms Description: While using the `throttled` commit-strategy, specify the max age in milliseconds that an unprocessed message can be before the connector is marked as unhealthy. Setting this attribute to 0 disables this monitoring. Default Value: 60000- Returns:
- the throttled.unprocessed-record-max-age.ms
-
getCheckpointStateStore
Gets the checkpoint.state-store value from the configuration. Attribute Name: checkpoint.state-store Description: While using the `checkpoint` commit-strategy, the name set in `@Identifier` of a bean that implements `io.smallrye.reactive.messaging.kafka.StateStore.Factory` to specify the state store implementation.- Returns:
- the checkpoint.state-store
-
getCheckpointStateType
Gets the checkpoint.state-type value from the configuration. Attribute Name: checkpoint.state-type Description: While using the `checkpoint` commit-strategy, the fully qualified type name of the state object to persist in the state store. When provided, it can be used by the state store implementation to help persisting the processing state object.- Returns:
- the checkpoint.state-type
-
getCheckpointUnsyncedStateMaxAgeMs
Gets the checkpoint.unsynced-state-max-age.ms value from the configuration. Attribute Name: checkpoint.unsynced-state-max-age.ms Description: While using the `checkpoint` commit-strategy, specify the max age in milliseconds that the processing state must be persisted before the connector is marked as unhealthy. Setting this attribute to 0 disables this monitoring. Default Value: 10000- Returns:
- the checkpoint.unsynced-state-max-age.ms
-
getDeadLetterQueueTopic
Gets the dead-letter-queue.topic value from the configuration. Attribute Name: dead-letter-queue.topic Description: When the `failure-strategy` is set to `dead-letter-queue` indicates on which topic the record is sent. Defaults is `dead-letter-topic-$channel`- Returns:
- the dead-letter-queue.topic
-
getDeadLetterQueueProducerClientId
Gets the dead-letter-queue.producer-client-id value from the configuration. Attribute Name: dead-letter-queue.producer-client-id Description: When the `failure-strategy` is set to `dead-letter-queue` indicates what client id the generated producer should use. Defaults is `kafka-dead-letter-topic-producer-$client-id`- Returns:
- the dead-letter-queue.producer-client-id
-
getDeadLetterQueueKeySerializer
Gets the dead-letter-queue.key.serializer value from the configuration. Attribute Name: dead-letter-queue.key.serializer Description: When the `failure-strategy` is set to `dead-letter-queue` indicates the key serializer to use. If not set the serializer associated to the key deserializer is used- Returns:
- the dead-letter-queue.key.serializer
-
getDeadLetterQueueValueSerializer
Gets the dead-letter-queue.value.serializer value from the configuration. Attribute Name: dead-letter-queue.value.serializer Description: When the `failure-strategy` is set to `dead-letter-queue` indicates the value serializer to use. If not set the serializer associated to the value deserializer is used- Returns:
- the dead-letter-queue.value.serializer
-
getDelayedRetryTopicTopics
Gets the delayed-retry-topic.topics value from the configuration. Attribute Name: delayed-retry-topic.topics Description: When the `failure-strategy` is set to `delayed-retry-topic` indicates topics to use. If not set the source channel name is used, with 10, 20 and 50 seconds delayed topics.- Returns:
- the delayed-retry-topic.topics
-
getDelayedRetryTopicMaxRetries
Gets the delayed-retry-topic.max-retries value from the configuration. Attribute Name: delayed-retry-topic.max-retries Description: When the `failure-strategy` is set to `delayed-retry-topic` indicates the maximum number of retries. If higher than the number of delayed retry topics, last topic is used.- Returns:
- the delayed-retry-topic.max-retries
-
getDelayedRetryTopicTimeout
Gets the delayed-retry-topic.timeout value from the configuration. Attribute Name: delayed-retry-topic.timeout Description: When the `failure-strategy` is set to `delayed-retry-topic` indicates the global timeout per record. Default Value: 120000- Returns:
- the delayed-retry-topic.timeout
-
getPartitions
Gets the partitions value from the configuration. Attribute Name: partitions Description: The number of partitions to be consumed concurrently. The connector creates the specified amount of Kafka consumers. It should match the number of partition of the targeted topic Default Value: 1- Returns:
- the partitions
-
getRequests
Gets the requests value from the configuration. Attribute Name: requests Description: When `partitions` is greater than 1, this attribute allows configuring how many records are requested by each consumers every time. Default Value: 128- Returns:
- the requests
-
getConsumerRebalanceListenerName
Gets the consumer-rebalance-listener.name value from the configuration. Attribute Name: consumer-rebalance-listener.name Description: The name set in `@Identifier` of a bean that implements `io.smallrye.reactive.messaging.kafka.KafkaConsumerRebalanceListener`. If set, this rebalance listener is applied to the consumer.- Returns:
- the consumer-rebalance-listener.name
-
getKeyDeserializationFailureHandler
Gets the key-deserialization-failure-handler value from the configuration. Attribute Name: key-deserialization-failure-handler Description: The name set in `@Identifier` of a bean that implements `io.smallrye.reactive.messaging.kafka.DeserializationFailureHandler`. If set, deserialization failure happening when deserializing keys are delegated to this handler which may retry or provide a fallback value.- Returns:
- the key-deserialization-failure-handler
-
getValueDeserializationFailureHandler
Gets the value-deserialization-failure-handler value from the configuration. Attribute Name: value-deserialization-failure-handler Description: The name set in `@Identifier` of a bean that implements `io.smallrye.reactive.messaging.kafka.DeserializationFailureHandler`. If set, deserialization failure happening when deserializing values are delegated to this handler which may retry or provide a fallback value.- Returns:
- the value-deserialization-failure-handler
-
getFailOnDeserializationFailure
Gets the fail-on-deserialization-failure value from the configuration. Attribute Name: fail-on-deserialization-failure Description: When no deserialization failure handler is set and a deserialization failure happens, report the failure and mark the application as unhealthy. If set to `false` and a deserialization failure happens, a `null` value is forwarded. Default Value: true- Returns:
- the fail-on-deserialization-failure
-
getGracefulShutdown
Gets the graceful-shutdown value from the configuration. Attribute Name: graceful-shutdown Description: Whether or not a graceful shutdown should be attempted when the application terminates. Default Value: true- Returns:
- the graceful-shutdown
-
getPollTimeout
Gets the poll-timeout value from the configuration. Attribute Name: poll-timeout Description: The polling timeout in milliseconds. When polling records, the poll will wait at most that duration before returning records. Default is 1000ms Default Value: 1000- Returns:
- the poll-timeout
-
getPauseIfNoRequests
Gets the pause-if-no-requests value from the configuration. Attribute Name: pause-if-no-requests Description: Whether the polling must be paused when the application does not request items and resume when it does. This allows implementing back-pressure based on the application capacity. Note that polling is not stopped, but will not retrieve any records when paused. Default Value: true- Returns:
- the pause-if-no-requests
-
getBatch
Gets the batch value from the configuration. Attribute Name: batch Description: Whether the Kafka records are consumed in batch. The channel injection point must consume a compatible type, such as `List` or `KafkaRecordBatch `. Default Value: false - Returns:
- the batch
-
getMaxQueueSizeFactor
Gets the max-queue-size-factor value from the configuration. Attribute Name: max-queue-size-factor Description: Multiplier factor to determine maximum number of records queued for processing, using `max.poll.records` * `max-queue-size-factor`. Defaults to 2. In `batch` mode `max.poll.records` is considered `1`. Default Value: 2- Returns:
- the max-queue-size-factor
-
validate
public void validate()- Overrides:
validatein classKafkaConnectorCommonConfiguration
-