Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aws-sqs-poll

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-sqs-poll - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

4

index.js
'use strict';
const AWS = require('aws-sdk');
const pify = require('pify');
const isAWSID = require('is-aws-account-id');
const isAwsAccountId = require('is-aws-account-id');

@@ -29,3 +29,3 @@ const sqs = new AWS.SQS();

}
if (opts.awsAccountId && !isAWSID(opts.awsAccountId)) {
if (opts.awsAccountId && !isAwsAccountId(opts.awsAccountId)) {
return Promise.reject(new TypeError('Invalid AWS Account Id'));

@@ -32,0 +32,0 @@ }

{
"name": "aws-sqs-poll",
"version": "0.0.1",
"version": "0.0.2",
"description": "Polling messages from AWS SQS",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -24,4 +24,14 @@ # aws-sqs-poll [![Build Status](https://travis-ci.org/SimonJang/aws-sqs-poll.svg?branch=master)](https://travis-ci.org/SimonJang/aws-sqs-poll)

awsSqsPoll('QueueName', [options])
// [messages]
awsSqsPoll('QueueName')
// ["MessageId": "28f61fd2-b9ca-4cb9-879a-71ea8bce4636",
// "ReceiptHandle": "AQEB9mnsxtAZlwnDERxn3yADAP96QRe0KPbqaKXLvvchqmD4jAr",
// "MD5OfBody": "098f6bcd4621d373cade4e832627b4f6",
// "Body": "test"]
awsSqsPoll('QueueName', {AwsAccountId: '123456789012', numberOfMessages: 1, timeout: 20, json: false})
// ["MessageId": "28f61fd2-b9ca-4cb9-879a-71ea8bce4636",
// "ReceiptHandle": "AQEB9mnsxtAZlwnDERxn3yADAP96QRe0KPbqaKXLvvchqmD4jAr",
// "MD5OfBody": "098f6bcd4621d373cade4e832627b4f6",
// "Body": "test"]
```

@@ -31,3 +41,3 @@

### aws-sqs-poll(queueName, options)
### aws-sqs-poll(queueName, [options])

@@ -43,3 +53,3 @@ #### queueName

`options.awsAccountId`
##### options.awsAccountId

@@ -51,17 +61,17 @@ Type: `string`

`options.numberOfMessages`
##### options.numberOfMessages
Type: `number`
Number of messages to be retrieved in 1 polling action.
Number of messages to be retrieved in 1 polling action. When polling a queue with few messages (< 1000 messages), you will get less messages then the numberOfMessages parameter.
`options.timeout`
##### options.timeout
Type: `number`
Timeout to listen to the queue for new messages.
Timeout (polling time) to listen to the queue for new messages.
`options.json`
##### options.json

@@ -68,0 +78,0 @@ Type: `boolean`

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