Socket
Socket
Sign inDemoInstall

sqs-producer

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sqs-producer - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

16

lib/producer.js

@@ -78,2 +78,18 @@ 'use strict';

if (message.groupId) {
if (typeof message.groupId !== 'string') {
throw new Error('Message.groupId value must be a string');
}
entry.MessageGroupId = message.groupId;
}
if (message.deduplicationId) {
if (typeof message.deduplicationId !== 'string') {
throw new Error('Message.deduplicationId value must be a string');
}
entry.MessageDeduplicationId = message.deduplicationId;
}
return entry;

@@ -80,0 +96,0 @@ }

2

package.json
{
"name": "sqs-producer",
"version": "1.4.0",
"version": "1.5.0",
"description": "Enqueues messages onto a given SQS queue",

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

@@ -64,2 +64,18 @@ sqs-producer

// send a message to a FIFO queue
//
// note that AWS FIFO queues require two additional params:
// - groupId (string)
// - deduplicationId (string)
//
// deduplicationId can be excluded if content-based deduplication is enabled
//
// http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html
producer.send({
body: 'Hello world from our FIFO queue!',
groupId: 'group1234',
deduplicationId: 'abcdef123456' // typically a hash of the message body
}, function(err) {
if (err) console.log(err);
});
```

@@ -66,0 +82,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