0.1.6 • Published 9 years ago

off-sqs v0.1.6

Weekly downloads
9
License
GNU
Repository
-
Last release
9 years ago

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);

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago