2.1.0 • Published 2 years ago

@aptoma/sqs-consumer v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

SQS Consumer

Module for consuming AWS SQS queue.

Inspired by https://github.com/bbc/sqs-consumer but allows batchSize to be higher than 10

Example

const Consumer = require('@aptoma/sqs-consumer');
const app = new Consumer({
	queueUrl: 'https://sqs.eu-central-1.amazonaws.com/....',
	batchSize: 15,
	waitTimeSeconds: 10,
	aws: {
		region: 'eu-central-1'
	},
	async handleMessage(message, cb) {
		console.log(message);
		await doSometing(message);
		cb();
	}
});

app.on('error', console.error);

(async () => {
	await app.start();
})();
2.1.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.0

5 years ago