aws-samples / integration-sample-lambda-msk

MIT No Attribution
11 stars 7 forks source link

Parallelization Factor for MSK Event Source Mapping #2

Open davidtwomey opened 4 years ago

davidtwomey commented 4 years ago

Hi,

Is there a way to set concurrency of the lambda function so that multiple batches can be processed simultaneouly?

From the aws lambda cli docs I see there is a --parallelization-factor which I think is supported for Kinesis streams, but not MSK?

Are there any plans to support this for MSK?

If I understood the MSK event source correctly, it polls a target MSK topic across partitions and invokes a lambda function with the obtained batch synchronously? So in order to poll for another batch, the invoked lambda function must complete execution before a subsequent poll can begin?

Therefore, the throughput that can be handled is a function of:

For example, if the execution takes 100ms vs. 10secs this makes a difference to the consumer lag in high-throughput topics?

Many thanks,

David

davidtwomey commented 3 years ago

@rcchakr any insight here? Or could you point me in the direction of someone who could answer this?

rcchakr commented 3 years ago

@davidtwomey This is something the Lambda team is looking to do but there are no specific timelines yet.