@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.514Z") @Stability(value=Stable) public interface SelfManagedKafkaEventSourceProps extends software.amazon.jsii.JsiiSerializable, KafkaEventSourceProps
If your Kafka cluster is only reachable via VPC make sure to configure it.
Example:
// Example automatically generated from non-compiling source. May contain errors.
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;
// (Optional) The secret containing the root CA certificate that your Kafka brokers use for TLS encryption
Secret encryption;
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";
// (Optional) The consumer group id to use when connecting to the Kafka broker. If omitted the UUID of the event source mapping will be used.
String consumerGroupId;
myFunction.addEventSource(SelfManagedKafkaEventSource.Builder.create()
.bootstrapServers(bootstrapServers)
.topic(topic)
.consumerGroupId(consumerGroupId)
.secret(secret)
.batchSize(100) // default
.startingPosition(StartingPosition.TRIM_HORIZON)
.encryption(encryption)
.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.
|
List<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 ISecret |
getRootCACertificate()
The secret with the root CA certificate used by your Kafka brokers for TLS encryption This field is required if your Kafka brokers use certificates signed by a private CA.
|
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.
|
getConsumerGroupId, getSecret, getTopicgetBatchSize, getEnabled, getMaxBatchingWindow, getStartingPosition@Stability(value=Stable) @NotNull List<String> getBootstrapServers()
They are in the format abc.xyz.com:xxxx.
@Stability(value=Stable) @Nullable default AuthenticationMethod getAuthenticationMethod()
Default: AuthenticationMethod.SASL_SCRAM_512_AUTH
@Stability(value=Stable) @Nullable default ISecret getRootCACertificate()
Default: - none
@Stability(value=Stable) @Nullable default ISecurityGroup getSecurityGroup()
Default: - none, required if setting vpc
@Stability(value=Stable) @Nullable default IVpc getVpc()
Default: none
@Stability(value=Stable) @Nullable default SubnetSelection getVpcSubnets()
Default: - none, required if setting vpc
@Stability(value=Stable) static SelfManagedKafkaEventSourceProps.Builder builder()
builder in interface BaseStreamEventSourcePropsbuilder in interface KafkaEventSourcePropsSelfManagedKafkaEventSourceProps.Builder of SelfManagedKafkaEventSourcePropsCopyright © 2022. All rights reserved.