Wrap Amazon SQS into Readable stream
CoffeeScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
README.mkd
index.coffee
package.json

README.mkd

SQS Stream

Wraps Amazon SQS into Readable stream

Usage

Here is our in-use code snippet

topic = require 'sqs-stream'

topic.createReadStream({
  url: 'YOUR_SQS_QUEUE_URL',
  accessKeyId: 'your-access-key',
  secretAccessKey: 'your-access-secret',
  region: 'your-region'
}).pipe(process.stdout)

API

createReadStream

createReadStream(options)

create Readable Stream from given queue URL. available options are

setConfig

setConfig(options) # DEPRECATED

set AWS credentials, all parameters are just passed into aws-sdk. available options are

  • options.accessKeyId - Your AWS access key(required)
  • options.secretAccessKey - Your AWS secret key(required)
  • options.region - Your AWS region(defaults to 'us-east-1' as aws-sdk does)

TODO

  • Limit total number of messages
  • Give user way how to delete processed messages