-
Notifications
You must be signed in to change notification settings - Fork 4.5k
SelfManagedKafkaEventSourceProps: default maxBatchingWindow incorrect #21974
Description
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!