interface ProvisionedPollerConfig
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Lambda.EventSources.ProvisionedPollerConfig |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awslambdaeventsources#ProvisionedPollerConfig |
Java | software.amazon.awscdk.services.lambda.eventsources.ProvisionedPollerConfig |
Python | aws_cdk.aws_lambda_event_sources.ProvisionedPollerConfig |
TypeScript (source) | aws-cdk-lib » aws_lambda_event_sources » ProvisionedPollerConfig |
Example
import { ManagedKafkaEventSource } from 'aws-cdk-lib/aws-lambda-event-sources';
// Your MSK cluster arn
declare const clusterArn: string
// The Kafka topic you want to subscribe to
const topic = 'some-cool-topic';
declare const myFunction: lambda.Function;
myFunction.addEventSource(new ManagedKafkaEventSource({
clusterArn,
topic,
startingPosition: lambda.StartingPosition.TRIM_HORIZON,
provisionedPollerConfig: {
minimumPollers: 1,
maximumPollers: 3,
},
}));
Properties
Name | Type | Description |
---|---|---|
maximum | number | The maximum number of pollers that can be provisioned. |
minimum | number | The minimum number of pollers that should be provisioned. |
maximumPollers
Type:
number
The maximum number of pollers that can be provisioned.
minimumPollers
Type:
number
The minimum number of pollers that should be provisioned.