Interface ProvisionedPollerConfig

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

@Generated(value="jsii-pacmak/1.126.0 (build 206d44b)", date="2026-02-03T13:58:25.802Z") @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;
 Function myFunction;
 // Your MSK cluster arn
 String clusterArn = "arn:aws:kafka:us-east-1:0123456789019:cluster/SalesCluster/abcd1234-abcd-cafe-abab-9876543210ab-4";
 // Enable basic event and error metrics
 myFunction.addEventSource(ManagedKafkaEventSource.Builder.create()
         .clusterArn(clusterArn)
         .topic("basic-monitoring")
         .startingPosition(StartingPosition.LATEST)
         // Provisioned mode is required for observability features
         .provisionedPollerConfig(ProvisionedPollerConfig.builder()
                 .minimumPollers(2)
                 .maximumPollers(10)
                 .build())
         .metricsConfig(MetricsConfig.builder()
                 .metrics(List.of(MetricType.EVENT_COUNT, MetricType.ERROR_COUNT))
                 .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