Testing Amazon Web Services Codebase: SQS

SQS is a que messaging service. The sqs client is based on http and polling instead of following a listener approach therefore it is easy to use mocking utils to mock its functionality. However there is an alternative closer to the actual service.

ElasticMq is a queueing system written in scala which is compatible with the sqs interfaces.

By issuing

java -jar elasticmq-server-0.8.12.jar

you have an ElasticMQ instance up and running on port 9324.

Since it is compatible with the amazon sqs you will use exactly the same procedure to establish a connection and send messages.

AmazonSQSClient amazonSQSClient = new AmazonSQSClient(new BasicAWSCredentials("",""));

SQS will definetely come in handy for any Integration tests or even unit tests.


One thought on “Testing Amazon Web Services Codebase: SQS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.