Interface ManagedKafkaEventSourceProps
- All Superinterfaces:
BaseStreamEventSourceProps,software.amazon.jsii.JsiiSerializable,KafkaEventSourceProps
- All Known Implementing Classes:
ManagedKafkaEventSourceProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:12.864Z")
@Stability(Stable)
public interface ManagedKafkaEventSourceProps
extends software.amazon.jsii.JsiiSerializable, KafkaEventSourceProps
Properties for a MSK event source.
Example:
import software.amazon.awscdk.services.lambda.eventsources.ManagedKafkaEventSource;
import software.amazon.awscdk.services.lambda.eventsources.KafkaDlq;
Function myFunction;
// Your MSK cluster arn
String clusterArn = "arn:aws:kafka:us-east-1:0123456789019:cluster/SalesCluster/abcd1234-abcd-cafe-abab-9876543210ab-4";
// The Kafka topic you want to subscribe to
String topic = "some-cool-topic";
// Create a Kafka DLQ destination
KafkaDlq kafkaDlq = new KafkaDlq("failure-topic");
myFunction.addEventSource(ManagedKafkaEventSource.Builder.create()
.clusterArn(clusterArn)
.topic(topic)
.startingPosition(StartingPosition.TRIM_HORIZON)
.onFailure(kafkaDlq)
.provisionedPollerConfig(ProvisionedPollerConfig.builder()
.minimumPollers(1)
.maximumPollers(1)
.build())
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forManagedKafkaEventSourcePropsstatic final classAn implementation forManagedKafkaEventSourceProps -
Method Summary
Methods inherited from interface software.amazon.awscdk.services.lambda.eventsources.BaseStreamEventSourceProps
getBatchSize, getEnabled, getMaxBatchingWindow, getProvisionedPollerConfig, getStartingPositionMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJsonMethods inherited from interface software.amazon.awscdk.services.lambda.eventsources.KafkaEventSourceProps
getBisectBatchOnError, getConsumerGroupId, getFilterEncryption, getFilters, getMaxRecordAge, getOnFailure, getReportBatchItemFailures, getRetryAttempts, getSchemaRegistryConfig, getSecret, getStartingPositionTimestamp, getTopic
-
Method Details
-
getClusterArn
An MSK cluster construct. -
builder
-