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

off-sqs-debearloper

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

off-sqs-debearloper

Helper app that manages SQS transactions

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

OFF-SQS: Manage SQS on node.js

This easy manager provides the basic functionality to use Amazon SQS. To start using it just clone it or install it via npm npm install off-sqs and edit the aws-config.json:

{
	"accessKeyId": "STRING",
	"secretAccessKey": "STRING",
	"region": "STRING"
}

###NOTE that every operation checks first if the Queue exists, if not it'll create it.

Methods

Sender

Params: the name of the SQS queue and the data you want to send. Returns: nothing. Usage: sqs.sender('myQueue', ["foo": "bar"]);

##Receiver Params: the name of the SQS queue. Return: a promise which it became a tuple of receivera function and queueUrl a string. Usage:

sqs.receiver('myQueue').then(function(Receiver){
	Receiver.receiver(yourDataManager, Receiver.url);
}

Note: Where yourDataManager is a function that receives every message on the queue, so you can easy custom your data miner. Something like: `myMiner(messageOfTheQueue);``

##getQueueUrl Params: The name of the SQS Queue. Returns: A promise which became the url of the Queue. Usage:

sqs.getQueueUrl('myQueue').then(function('myQueueURL'){
	return myQueueURL;
});

##parseMessage Params: Data received by SQS Queues. Returns: The cleaned data of the body as array. Usage: sqs.parseMessage(data);

#Examples

##Sender example sqs_off.sender("queue_name", data_to_send);

##Receiver example In the receiver method, we need to the functionality of process data as a function.

sqs_off.receiver("queue_name").then(function(data){
    data.receiver(save_data, data.url);
});

var save_data = function(data){
   //save your data
}

FAQs

Package last updated on 01 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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