Interface SelfManagedKafkaEventSourceProps
- All Superinterfaces:
BaseStreamEventSourceProps,software.amazon.jsii.JsiiSerializable,KafkaEventSourceProps
- All Known Implementing Classes:
SelfManagedKafkaEventSourceProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:46.839Z")
@Stability(Stable)
public interface SelfManagedKafkaEventSourceProps
extends software.amazon.jsii.JsiiSerializable, KafkaEventSourceProps
Properties for a self managed Kafka cluster event source.
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());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forSelfManagedKafkaEventSourcePropsstatic final classAn implementation forSelfManagedKafkaEventSourceProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default AuthenticationMethodThe authentication method for your Kafka cluster.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 ISecurityGroupIf your Kafka brokers are only reachable via VPC, provide the security group here.default IVpcgetVpc()If your Kafka brokers are only reachable via VPC provide the VPC here.default SubnetSelectionIf your Kafka brokers are only reachable via VPC, provide the subnets selection here.Methods inherited from interface software.amazon.awscdk.services.lambda.eventsources.BaseStreamEventSourceProps
getBatchSize, getEnabled, getMaxBatchingWindow, getStartingPositionMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJsonMethods inherited from interface software.amazon.awscdk.services.lambda.eventsources.KafkaEventSourceProps
getSecret, getTopic
-
Method Details
-
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.They are in the format
abc.xyz.com:xxxx. -
getAuthenticationMethod
The authentication method for your Kafka cluster.Default: AuthenticationMethod.SASL_SCRAM_512_AUTH
-
getSecurityGroup
If your Kafka brokers are only reachable via VPC, provide the security group here.Default: - none, required if setting vpc
-
getVpc
If your Kafka brokers are only reachable via VPC provide the VPC here.Default: none
-
getVpcSubnets
If your Kafka brokers are only reachable via VPC, provide the subnets selection here.Default: - none, required if setting vpc
-
builder
-