Interface ProvisionedPollerConfig

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
ProvisionedPollerConfig.Jsii$Proxy

@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)", date="2025-12-18T18:20:12.865Z") @Stability(Stable) public interface ProvisionedPollerConfig extends software.amazon.jsii.JsiiSerializable
(Amazon MSK and self-managed Apache Kafka only) The provisioned mode configuration for the 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());
 
  • Method Details

    • getMaximumPollers

      @Stability(Stable) @NotNull Number getMaximumPollers()
      The maximum number of pollers that can be provisioned.

      Default: 200

    • getMinimumPollers

      @Stability(Stable) @NotNull Number getMinimumPollers()
      The minimum number of pollers that should be provisioned.

      Default: 1

    • getPollerGroupName

      @Stability(Stable) @Nullable default String getPollerGroupName()
      An optional identifier that groups multiple ESMs to share EPU capacity and reduce costs.

      ESMs with the same PollerGroupName share compute resources.

      Default: - not set, dedicated compute resource per event source.

    • builder

      @Stability(Stable) static ProvisionedPollerConfig.Builder builder()
      Returns:
      a ProvisionedPollerConfig.Builder of ProvisionedPollerConfig