sqs-stream

Wrap Amazon SQS into Readable stream

npm install sqs-stream
2 downloads in the last week
19 downloads in the last month

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
npm loves you