Socket
Socket
Sign inDemoInstall

sqs-consumer

Package Overview
Dependencies
Maintainers
1
Versions
104
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 3.7.0 to 3.8.0

1

index.js

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

// start polling again once all of the messages have been processed
consumer.emit('response_processed');
consumer._poll();

@@ -135,0 +136,0 @@ });

2

package.json
{
"name": "sqs-consumer",
"version": "3.7.0",
"version": "3.8.0",
"description": "Build SQS-based Node applications without the boilerplate",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -114,2 +114,3 @@ # sqs-consumer

|`message_processed`|`message`|Fired when a message is successfully processed and removed from the queue.|
|`response_processed`|None|Fired after one batch of items (up to `batchSize`) has been successfully processed.|
|`stopped`|None|Fired when the consumer finally stops its work.|

@@ -116,0 +117,0 @@ |`empty`|None|Fired when the queue is empty (All messages have been consumed).|

@@ -438,2 +438,33 @@ 'use strict';

});
it('fires response_processed event for each batch', function (done) {
sqs.receiveMessage.yieldsAsync(null, {
Messages: [
{
ReceiptHandle: 'receipt-handle-1',
MessageId: '1',
Body: 'body-1'
},
{
ReceiptHandle: 'receipt-handle-2',
MessageId: '2',
Body: 'body-2'
}
]
});
handleMessage.yields(null);
consumer = new Consumer({
queueUrl: 'some-queue-url',
messageAttributeNames: ['attribute-1', 'attribute-2'],
region: 'some-region',
handleMessage: handleMessage,
batchSize: 2,
sqs: sqs
});
consumer.on('response_processed', done);
consumer.start();
});
});

@@ -440,0 +471,0 @@

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