# sqs-parallel

> [![Build Status](https://travis-ci.org/sallar/sqs-parallel.svg?branch=master)](https://travis-ci.org/sallar/sqs-parallel)

Latest version **1.2.2** (published 2018-01-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install sqs-parallel
pnpm add sqs-parallel
yarn add sqs-parallel
bun add sqs-parallel
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2018-01-05 |
| First published | 2017-12-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Maintainers | sallar |
| Keywords | sqs, parallel, aws, aws-sdk, amazon, queue, queues, sqs-queue, parallel-queue, sqs-queue-parallel |

## Links

- npm: https://www.npmjs.com/package/sqs-parallel
- Repository: https://github.com/sallar/sqs-parallel
- Homepage: https://github.com/sallar/sqs-parallel#readme
- Issues: https://github.com/sallar/sqs-parallel/issues
- npm.io page: https://npm.io/package/sqs-parallel

## Dependencies (1)

- [debug](https://npm.io/package/debug.md) ^3.1.0

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 1.2.2 (latest) — 2018-01-05
- 1.2.1 — 2018-01-02
- 1.2.0 — 2018-01-02
- 1.1.0 — 2017-12-08
- 1.0.0 — 2017-12-05

## README

# sqs-parallel

[![Build Status](https://travis-ci.org/sallar/sqs-parallel.svg?branch=master)](https://travis-ci.org/sallar/sqs-parallel)

🔥 Since
[bigluck/sqs-queue-parallel](https://github.com/bigluck/sqs-queue-parallel) is
dead and no one is checking the issues and PRs, I decided to:

* Rewrite the library in plain JS (look ma! no coffeescript!)
* Fix bugs and issues reported by users of that repo
* Consider including the proposed PRs
* Change callback style methods to return `Promise`s.

---

sqs-parallel is a **node.js** library build on top of **Amazon AWS SQS** with
**concurrency** and **parallel** message poll support.

You can create a poll of SQS queue watchers, each one can receive 1 or more
messages from Amazon SQS.

With sqs-parallel you need just to configure your AWS private keys, setup one or
more `message` event listeners and wait for new messages to arrive.

## Install

```bash
npm install sqs-parallel --save
```

## Example

```js
const { SqsParallel } = require('sqs-parallel');

// Simple configuration:
//  - 2 concurrency listeners
//  - each listener can receive up to 4 messages
// With this configuration you could receive and parse 8 `message` events in parallel
const queue = new SqsParallel({
  name: 'sqs-test',
  maxNumberOfMessages: 4,
  concurrency: 2
});

queue.on('message', e => {
  console.log('New message: ', e.metadata, e.data.MessageId);
  e.deleteMessage().then(() => {
    e.next();
  });
});

queue.on('error', err => {
  console.log('There was an error: ', err);
});
```

## License

This software is released under the [MIT License](LICENSE).

---
_Source: https://npm.io/package/sqs-parallel · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
