T - The type consumed from Kafka.public final class KafkaIngressBuilder<T>
extends java.lang.Object
IngressSpec for consuming data from Apache Kafka.| Modifier and Type | Method and Description |
|---|---|
KafkaIngressBuilder<T> |
addTopics(java.util.List<java.lang.String> topics) |
KafkaIngressSpec<T> |
build() |
static <T> KafkaIngressBuilder<T> |
forIdentifier(IngressIdentifier<T> id) |
KafkaIngressBuilder<T> |
withAutoResetPosition(KafkaIngressAutoResetPosition autoResetPosition) |
KafkaIngressBuilder<T> |
withConsumerGroupId(java.lang.String consumerGroupId) |
KafkaIngressBuilder<T> |
withDeserializer(java.lang.Class<? extends KafkaIngressDeserializer<T>> deserializerClass) |
KafkaIngressBuilder<T> |
withKafkaAddress(java.lang.String kafkaAddress) |
KafkaIngressBuilder<T> |
withProperties(java.util.Properties properties)
A configuration property for the KafkaConsumer.
|
KafkaIngressBuilder<T> |
withProperty(java.lang.String name,
java.lang.String value)
A configuration property for the KafkaProducer.
|
KafkaIngressBuilder<T> |
withStartupPosition(KafkaIngressStartupPosition startupPosition)
Configures the position that the ingress should start consuming from.
|
KafkaIngressBuilder<T> |
withTopic(java.lang.String topic) |
public static <T> KafkaIngressBuilder<T> forIdentifier(IngressIdentifier<T> id)
T - The type consumed from Kafka.id - A unique ingress identifier.KafkaIngressBuilder.public KafkaIngressBuilder<T> withConsumerGroupId(java.lang.String consumerGroupId)
consumerGroupId - the consumer group id to use.public KafkaIngressBuilder<T> withKafkaAddress(java.lang.String kafkaAddress)
kafkaAddress - Comma separated addresses of the brokers.public KafkaIngressBuilder<T> withTopic(java.lang.String topic)
topic - The name of the topic that should be consumed.public KafkaIngressBuilder<T> addTopics(java.util.List<java.lang.String> topics)
topics - A list of topics that should be consumed.public KafkaIngressBuilder<T> withProperties(java.util.Properties properties)
public KafkaIngressBuilder<T> withProperty(java.lang.String name, java.lang.String value)
public KafkaIngressBuilder<T> withDeserializer(java.lang.Class<? extends KafkaIngressDeserializer<T>> deserializerClass)
deserializerClass - The deserializer used to convert between Kafka's byte messages and
java objects.public KafkaIngressBuilder<T> withAutoResetPosition(KafkaIngressAutoResetPosition autoResetPosition)
autoResetPosition - the auto offset reset position to use, in case consumed offsets are
invalid.public KafkaIngressBuilder<T> withStartupPosition(KafkaIngressStartupPosition startupPosition)
KafkaIngressStartupPosition.fromLatest().
Note that this configuration only affects the position when starting the application from a fresh start. When restoring the application from a savepoint, the ingress will always start consuming from the offsets persisted in the savepoint.
startupPosition - the position that the Kafka ingress should start consuming from.KafkaIngressStartupPositionpublic KafkaIngressSpec<T> build()
KafkaIngressSpec.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.