Message reception

To implement the producer, follow the same principle by creating an EC2 instance in the Advanced Details section under User Data with the following script: http://bit.ly/2nCfT1X:

This script will download the sqs-batch-consumer script and configure a cron job that runs every minute to poll for 10 messages from each receive messages operation. The script will use the following tags:

If you SSH to the instance, you can visualize the cron output by issuing the following command:

tail -f /home/ec2-user/sqsjob.log

You are encouraged to create more than one worker to see that the queue gets drained more quickly, and you can also run these scripts locally from your computer with the proper access keys configured:

SQSProducer

http://bit.ly/2w0XxLM

SQSConsumer

http://bit.ly/2MNCVh2

 

Download the preceding files if you want to test the end-to-end solution locally.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.208.12