Skip to content

SelfManagedKafkaEventSourceProps: default maxBatchingWindow incorrect #21974

@yualexan

Description

@yualexan

Describe the issue

The given default value for maxBatchingWindow for the SelfManagedKafkaEventSourceProps resource is incorrect. It incorrectly states that the default is 0 seconds, when according to the Lambda documentation, it should be 500 ms:

For Amazon MSK, self-managed Apache Kafka, and Amazon MQ event sources: The default batching window is 500 ms.

According to a CDK doc writer, it appears that SelfManagedKafkaEventSource inherits that default from a base class, StreamEventSource, which is why the default is set to 0 seconds. While it's true that for some Lambda event sources (SQS, Kinesis, DDB streams) the default batching window is 0 seconds, for others (MSK, Kafka, MQ) it's 500 ms. In this case, SelfManagedKafkaEventSource should not be inheriting from the same class as the SQS, Kinesis, and DDB streams event sources.

Please correct this in the CDK documentation!

Links

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_event_sources.SelfManagedKafkaEventSourceProps.html#maxbatchingwindow

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions