T
- The type consumed from AWS Kinesis.public final class KinesisIngressBuilder<T>
extends java.lang.Object
IngressSpec
for consuming data from AWS Kinesis.Modifier and Type | Method and Description |
---|---|
KinesisIngressSpec<T> |
build() |
static <T> KinesisIngressBuilder<T> |
forIdentifier(IngressIdentifier<T> id) |
KinesisIngressBuilder<T> |
withAwsCredentials(AwsCredentials awsCredentials)
The AWS credentials to use.
|
KinesisIngressBuilder<T> |
withAwsRegion(AwsRegion awsRegion)
The AWS region to connect to.
|
KinesisIngressBuilder<T> |
withAwsRegion(java.lang.String regionName)
The AWS region to connect to, specified by the AWS region's unique id.
|
KinesisIngressBuilder<T> |
withClientConfigurationProperty(java.lang.String key,
java.lang.String value)
Deprecated.
Please use
withProperty(String, String) instead. |
KinesisIngressBuilder<T> |
withDeserializer(java.lang.Class<? extends KinesisIngressDeserializer<T>> deserializerClass) |
KinesisIngressBuilder<T> |
withProperties(java.util.Properties properties) |
KinesisIngressBuilder<T> |
withProperty(java.lang.String key,
java.lang.String value) |
KinesisIngressBuilder<T> |
withStartupPosition(KinesisIngressStartupPosition startupPosition)
Configures the position that the ingress should start consuming from.
|
KinesisIngressBuilder<T> |
withStream(java.lang.String stream) |
KinesisIngressBuilder<T> |
withStreams(java.util.List<java.lang.String> streams) |
public static <T> KinesisIngressBuilder<T> forIdentifier(IngressIdentifier<T> id)
T
- The type consumed from Kinesis.id
- A unique ingress identifier.KinesisIngressBuilder
.public KinesisIngressBuilder<T> withStream(java.lang.String stream)
stream
- The name of a stream that should be consumed.public KinesisIngressBuilder<T> withStreams(java.util.List<java.lang.String> streams)
streams
- A list of streams that should be consumed.public KinesisIngressBuilder<T> withDeserializer(java.lang.Class<? extends KinesisIngressDeserializer<T>> deserializerClass)
deserializerClass
- The deserializer used to convert between Kinesis's byte messages and
Java objects.public KinesisIngressBuilder<T> withStartupPosition(KinesisIngressStartupPosition startupPosition)
KinesisIngressStartupPosition.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 position persisted in the savepoint.
startupPosition
- the position that the Kafka ingress should start consuming from.KinesisIngressStartupPosition
public KinesisIngressBuilder<T> withAwsRegion(AwsRegion awsRegion)
awsRegion
- The AWS region to connect to.AwsRegion
public KinesisIngressBuilder<T> withAwsRegion(java.lang.String regionName)
regionName
- The unique id of the AWS region to connect to.public KinesisIngressBuilder<T> withAwsCredentials(AwsCredentials awsCredentials)
awsCredentials
- The AWS credentials to use.AwsCredentials
@Deprecated public KinesisIngressBuilder<T> withClientConfigurationProperty(java.lang.String key, java.lang.String value)
withProperty(String, String)
instead.Supported values are properties of AWS's com.aws.ClientConfiguration.
For example, to set a value for SOCKET_TIMEOUT
, the property key would be SocketTimeout
.
key
- the property to set.value
- the value for the property.public KinesisIngressBuilder<T> withProperty(java.lang.String key, java.lang.String value)
public KinesisIngressBuilder<T> withProperties(java.util.Properties properties)
public KinesisIngressSpec<T> build()
KinesisIngressSpec
.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.