Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS MSK lambda concurrent consumers

AWS Lambda Supports Parallelization Factor for Kinesis and DynamoDB Event Sources. But its not supported for MSK. Can we create a reserved concurrency of the Lambda function and would it help to concurrently consume from MSK topic

like image 643
dvlpr Avatar asked Jun 19 '26 18:06

dvlpr


1 Answers

TL'DR Connecting lambda to kafka cluster using aws::event-source-mapping is limited to the amount of partitions you are having in the topics

I had the experience to setup a poc of

Custom Kafka Cluster Topic (1 Partition) > EventSourceMapping > Lambda

and after opening a discussion with AWS it looks like it is a limitation

Another approach that I didn't try is to setup a lambda sink (kafka connect) and setup a tasks.max which seems like it can solve this issue https://docs.confluent.io/kafka-connectors/aws-lambda/current/overview.html#lambda-sink-multiple-tasks

like image 80
Omer Shacham Avatar answered Jun 23 '26 12:06

Omer Shacham