Are you using Kue with Redis backend?
This a quick way to replace Kue with Amazon SQS backend.
Instead of:
var kue = require('kue'),
queue = kue.createQueue();
Do like this:
var AWS = require('aws-sdk')
var sqs = new AWS.SQS({
region: '',
accessKeyId: '',
secretAccessKey: ''
})
var SQSWorker = require('sqs-taskqueue'),
queue = new SQSWorker(
sqs,
'https://sqs.ap-northeast-1.amazonaws.com/XXXXXXXXXX/',
'yourapp'
);
The rest they are the same!!!
For example:
var job = queue.create('email', {
title: 'welcome email for tj'
, to: 'dummy@google.com'
, template: 'welcome-email'
}).save( function(err){
if( !err ) console.log( job.id );
});