0.0.7 • Published 10 years ago

aws-sqs-wrapper v0.0.7

Weekly downloads
3
License
ISC
Repository
github
Last release
10 years ago

Simple SQS wrapper for Node.js

Simple SQS wrapper used for recieving and sending message over the SQS queue in Node.js.

var SqsWrapper = require('aws-sqs-wrapper');

var sqsQueue = SqsWrapper.create({
                aws: {
                    region: "region",
                    accessKeyId: "accKey",
                    secretAccessKey: "secret",
                    params: {
                        QueueUrl: "url"
                    }
                },
                poll: {
                    VisibilityTimeout: 10,
                    WaitTimeSeconds: 10
                }
});

sqsQueue.on("message_received",function(err,data) {
    // handle recieved message from the queue
    handle(data);
    
    // delete the messsage from the sqs queue
    sqsQueue.delete(data.Messages[0],function(err,succ))
});

// start long polling for data on the queuee
sqsQueue.startPolling();

// send some data to the queue
sqsQueue.sendMessage({MessageBody : "Some cool msgs"},function(err,succ) {
    // handle callback
})
0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.14

10 years ago

0.0.13

10 years ago

0.0.121

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.1

10 years ago