Socket
Socket
Sign inDemoInstall

sqs-consumer

Package Overview
Dependencies
Maintainers
3
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sqs-consumer - npm Package Compare versions

Comparing version 2.1.2 to 2.2.0

3

index.js

@@ -31,2 +31,3 @@ 'use strict';

* @param {function} options.handleMessage
* @param {array} options.messageAttributeNames
* @param {number} options.batchSize

@@ -40,2 +41,3 @@ * @param {object} options.sqs

this.handleMessage = options.handleMessage;
this.messageAttributeNames = options.messageAttributeNames || [];
this.stopped = true;

@@ -79,2 +81,3 @@ this.batchSize = options.batchSize || 1;

QueueUrl: this.queueUrl,
MessageAttributeNames: this.messageAttributeNames,
MaxNumberOfMessages: this.batchSize,

@@ -81,0 +84,0 @@ WaitTimeSeconds: 20

{
"name": "sqs-consumer",
"version": "2.1.2",
"version": "2.2.0",
"description": "Build SQS-based Node applications without the boilerplate",

@@ -36,3 +36,17 @@ "main": "index.js",

"debug": "^2.1.0"
},
"jshintConfig": {
"quotmark": "single",
"unused": true,
"undef": true,
"node": true,
"globals": {
"describe": false,
"it": false,
"before": false,
"beforeEach": false,
"after": false,
"afterEach": false
}
}
}

3

README.md

@@ -49,3 +49,4 @@ # sqs-consumer

* `region` - _String_ - The AWS region (default `eu-west-1`)
* `handleMessage` - _Function_ - A function to be called whenever a message is receieved. Receives an SQS message object as its first argument and a function to call when the message has been handled as its second argument (i.e. `handleMessage(message, done)`).
* `handleMessage` - _Function_ - A function to be called whenever a message is received. Receives an SQS message object as its first argument and a function to call when the message has been handled as its second argument (i.e. `handleMessage(message, done)`).
* `messageAttributeNames` - _Array_ - List of message attributes to retrieve (i.e. `['name', 'address']`).
* `batchSize` - _Number_ - The number of messages to request from SQS when polling (default `1`). This cannot be higher than the AWS limit of 10.

@@ -52,0 +53,0 @@ * `sqs` - _Object_ - An optional [AWS SQS](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SQS.html) object to use if you need to configure the client manually

@@ -229,2 +229,3 @@ 'use strict';

queueUrl: 'some-queue-url',
messageAttributeNames: ['attribute-1', 'attribute-2'],
region: 'some-region',

@@ -241,2 +242,3 @@ handleMessage: handleMessage,

QueueUrl: 'some-queue-url',
MessageAttributeNames: ['attribute-1', 'attribute-2'],
MaxNumberOfMessages: 3,

@@ -243,0 +245,0 @@ WaitTimeSeconds: 20

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc