@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:49.252Z") public interface SelfManagedKafkaEventSourceProps extends KafkaEventSourceProps
If your Kafka cluster is only reachable via VPC make sure to configure it.
Example:
import software.amazon.awscdk.services.secretsmanager.Secret; import software.amazon.awscdk.services.lambda.eventsources.SelfManagedKafkaEventSource; // The secret that allows access to your self hosted Kafka cluster Secret secret; Function myFunction; // The list of Kafka brokers String[] bootstrapServers = List.of("kafka-broker:9092"); // The Kafka topic you want to subscribe to String topic = "some-cool-topic"; myFunction.addEventSource(SelfManagedKafkaEventSource.Builder.create() .bootstrapServers(bootstrapServers) .topic(topic) .secret(secret) .batchSize(100) // default .startingPosition(StartingPosition.TRIM_HORIZON) .build());
Modifier and Type | Interface and Description |
---|---|
static class |
SelfManagedKafkaEventSourceProps.Builder
A builder for
SelfManagedKafkaEventSourceProps |
static class |
SelfManagedKafkaEventSourceProps.Jsii$Proxy
An implementation for
SelfManagedKafkaEventSourceProps |
Modifier and Type | Method and Description |
---|---|
static SelfManagedKafkaEventSourceProps.Builder |
builder() |
default AuthenticationMethod |
getAuthenticationMethod()
The authentication method for your Kafka cluster.
|
java.util.List<java.lang.String> |
getBootstrapServers()
The list of host and port pairs that are the addresses of the Kafka brokers in a "bootstrap" Kafka cluster that a Kafka client connects to initially to bootstrap itself.
|
default ISecurityGroup |
getSecurityGroup()
If your Kafka brokers are only reachable via VPC, provide the security group here.
|
default IVpc |
getVpc()
If your Kafka brokers are only reachable via VPC provide the VPC here.
|
default SubnetSelection |
getVpcSubnets()
If your Kafka brokers are only reachable via VPC, provide the subnets selection here.
|
getSecret, getTopic
getBatchSize, getEnabled, getMaxBatchingWindow, getStartingPosition
java.util.List<java.lang.String> getBootstrapServers()
They are in the format abc.xyz.com:xxxx
.
default AuthenticationMethod getAuthenticationMethod()
Default: AuthenticationMethod.SASL_SCRAM_512_AUTH
default ISecurityGroup getSecurityGroup()
Default: - none, required if setting vpc
default IVpc getVpc()
Default: none
default SubnetSelection getVpcSubnets()
Default: - none, required if setting vpc
static SelfManagedKafkaEventSourceProps.Builder builder()
builder
in interface BaseStreamEventSourceProps
builder
in interface KafkaEventSourceProps
SelfManagedKafkaEventSourceProps.Builder
of SelfManagedKafkaEventSourceProps