slipstream-sqs
v1.0.0
Published
A SQS queue provider for Slipstream
Downloads
4
Maintainers
Readme
SQS Queue Provider for Slipstream
This is a SQS queue provider for Slipstream.
Install
npm install slipstream-sqs --save
Although it can be used on it's own (it is effectively just a wrapper around aws-sdk-js), it is intended to be used in conjunction with Slipstream.
Example
var Queue = require('slipstream');
var Sqs = require('slipstream-sqs');
var provider = new Sqs({
region: 'us-west-1',
accessKeyId: 'your access id',
secretAccessKey: 'your access key',
queueUrl: 'sqs queue url'
});
var queue = new Queue({
provider: provider
});
queue.on(queue.EVENTS.MESSAGE_RECEIVED, function(message, done) {
//do some processing on a message
var data = message.data;
done();
});
queue.process();
For more information on how queues are processed, see the docs on the Slipstream github.
Tests
npm test