Event driven Amazon MQ for RabbitMQ message processing using AWS Lambda

Amazon MQ → AWS Lambda

This sample project shows event driven message processing from an Amazon MQ for RabbitMQ queue using an AWS Lambda function written in Java.

An Amazon MQ for RabbitMQ single-instance broker is provisioned. A test queue with name MyTestQueue is created. A message is pushed to the queue.
An AWS Lambda function has an event source mapping (ESM) configured for MyTestQueue queue. The Lambda function is triggered by the new message on the Amazon MQ queue. The Lambda function processes the message and logs the decoded the message content.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/rabbitmq-lambda-sam-java

Deploy

sam buildsam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Created by:

Biswanath Mukherjee

Biswanath Mukherjee

Sr. Solutions Architect working at AWS India.

Follow on LinkedIn

Rakshith Rao

Rakshith Rao

I am a Senior Solutions Architect at AWS and help our strategic customers build and operate their key workloads on AWS.

Follow on LinkedIn