Lambda Does Not Scale for Amazon MQ: RabbitMQ event source

0

AWS Lambda function triggered by Amazon MQ: RabbitMQ event source. It works fine and consumes messages from the queue, but It does not scale with respect to the queue load.

  • Lambda function uses Unreserved account concurrency and it is 1000 but concurrency is usually around 2 or 1.
  • Batch_Size and Batch_window parameters do not affect the consumption speed much. Is there any configuration need to be considered to make the lambda function adapt its queue consumption speed to queue load?
furkan
asked 2 years ago1195 views
2 Answers
2
Accepted Answer

Lambda doesn't autoscale with Amazon MQ as an event source. It has a fixed concurrency. For ActiveMQ it is 5, for Rabbit MQ it is 3. Note that these values may change without any notice.

profile pictureAWS
EXPERT
Uri
answered 2 years ago
  • thank you for the response.

  • @Uri @furkan we are facing the same problem, do you to how much count has the concurrency for ActiveMQ increased ? Or any workaround to such a situation ?

  • @Uri For the life of me, I cannot find anywhere in the documentation that states this limit. Is this limitation still in place? I'm trying to evaluate if a Lambda with Amazon MQ as a source is a viable solution for a problem I'm solving and this would be a deal breaker.

  • As far as I know, this still the limit. To increase the processing speed you can use batching and then use multiple threads in the function to handle the messages in the batch concurrently. Another option is to duplicate the function and create multiple triggers on the same queue. Not very pretty, but will do the work.

0

Currently the fixed concurrency is 5 for ActiveMQ as an event source and 1 for RabbitMQ as an event source.

AWS
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions