# sqs-request

> A docker image to build a SQS queue listener. Written in TypeScript, made to use with docker.

Latest version **2.1.3** (published 2022-02-23) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.3 |
| Published | 2022-02-23 |
| First published | 2020-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 27.2 KB |
| Known vulnerabilities | 0 (+24 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Marcus Yoda |
| Maintainers | marcusyoda |

## Links

- npm: https://www.npmjs.com/package/sqs-request
- Repository: https://github.com/marcusyoda/sqs-request
- npm.io page: https://npm.io/package/sqs-request

## Dependencies (4)

- [axios](https://npm.io/package/axios.md) ^0.26.0
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.1060.0
- [ts-print](https://npm.io/package/ts-print.md) ^1.1.2
- [squiss-ts](https://npm.io/package/squiss-ts.md) ^4.2.1

## Recent versions

- 2.1.3 (latest) — 2022-02-23
- 2.1.2 — 2022-02-23
- 2.1.1 — 2022-01-28
- 2.1.0 — 2022-01-27
- 2.0.4 — 2022-01-27
- 2.0.3 — 2022-01-25
- 2.0.2 — 2022-01-20
- 2.0.1 — 2022-01-20
- 2.0.0 — 2022-01-19
- 1.3.0 — 2020-08-31

## README

![image](https://user-images.githubusercontent.com/24211410/150356800-541ea46b-7019-4b25-bde2-98dbb18836fa.png)

# sqs-request
A docker image to build a SQS queue listener. Written in TypeScript, made to use with docker.
SQS queue processor with node, ts-squiss, which processes each message as a request.

![GitHub package.json version](https://img.shields.io/github/package-json/v/marcusyoda/sqs-request)
![Libraries.io dependency status for latest release, scoped npm package](https://img.shields.io/librariesio/release/npm/sqs-request) ![npm](https://img.shields.io/npm/dy/sqs-request)
[![](https://img.shields.io/github/languages/code-size/badges/shields.svg)](https://github.com/marcusyoda/sqs-request)
[![](https://img.shields.io/github/last-commit/google/skia.svg)](https://github.com/marcusyoda/sqs-request)
![GitHub Repo stars](https://img.shields.io/github/stars/marcusyoda/sqs-request)
![GitHub issues](https://img.shields.io/github/issues/marcusyoda/sqs-request)

## TECHNOLOGY:

![LINUX](https://img.shields.io/badge/Linux-FCC624?style=flat-square&logo=linux&logoColor=black)
![WINDOWS](https://img.shields.io/badge/Windows-navy?style=flat-square&logo=windows&logoColor=white)
![DOCKER](https://img.shields.io/badge/-Docker-2496ED?style=flat-square&logo=docker&logoColor=white)
![TYPESCRIPT](https://img.shields.io/badge/TypeScript-2d79c7?style=flat-square&logo=typescript&logoColor=white)
![JAVASCRIPT](https://img.shields.io/badge/-JavaScript-black?style=flat-square&logo=javascript&logoColor=yellow)
![NODE](https://img.shields.io/badge/-Nodejs-339933?style=flat-square&logo=Node.js&logoColor=white)

## WHO SHOULD USE:
Any developer who needs to process a queue at SQS, very well configurable.

## READY TO USE:
https://hub.docker.com/r/marcusyoda/sqs-request

## GETTING STARTED:
To use you need to build with docker...
```bash
docker build -t marcusyoda/sqs-request .
```  
  
...and then configure as your preference:  

It's a docker image, so you're expected to run on your infrastructure consuming an Amazon SQS queue.  
The settings are made via environment:  

|ENV-VAR              | DEFAULT | REQUIRED | DESCRIPTION                                                                                                                                                                                                                                                                            |
|----------------------|--------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|AWS_ACCESS_KEY_ID     |                  |   **YES**   | Amazon login KEY data.
|AWS_SECRET_ACCESS_KEY |                  |   **YES**   | Amazon login SECRET data.
|SQS_REGION            |                  |   **YES**   | The queue region in SQS.
|SQS_QUEUE_NAME        |                  |   **YES**   | The name of the queue in SQS.
|MAX_IN_FLIGHT         |       100        |   **NO**   | The number of messages to keep "in-flight", or processing simultaneously. When this cap is reached, no more messages will be polled until currently in-flight messages are marked as deleted or handled. Setting this option to 0 will uncap your inFlight messages, pulling and delivering messages as long as there are messages to pull. |
|BATCH_SIZE            |       10         |   **NO**   | The number of messages to receive at one time. Maximum 10 or maxInFlight, whichever is lower.                                                                                                                                                                                                                                               |
|POOL_INTERVAL_MS      |       0          |   **NO**   | The number of milliseconds to wait between requesting batches of messages when the queue is not empty, and the maxInFlight cap has not been hit. For most use cases, it's better to leave this at 0 and let Squiss manage the active polling frequency according to maxInFlight.                                                            |
|DELAY_SECS            |       0          |   **NO**   | The number of milliseconds by which to delay the delivery of new messages into the queue by default.                                                                                                                                                                                                                                        |
|DELETE_BATCH_SIZE     |       10         |   **NO**   | The number of messages to delete at one time. Squiss will trigger a batch delete when this limit is reached, or when deleteWaitMs milliseconds have passed since the first queued delete in the batch; whichever comes first. Set to 1 to make all deletes immediate. Maximum 10.                                                           |
|DELETE_WAIT_MS        |       2000       |   **NO**   | The number of milliseconds to wait after the first queued message deletion before deleting the message(s) from SQS.                                                                                                                                                                                                                         |
|IDLE_POLL_INTERVAL_MS |       0          |   **NO**   | The number of milliseconds to wait before requesting a batch of messages when the queue was empty on the prior request.                                                                                                                                                                                                                     |
|AWS_ENDPOINT          |                  |   **NO**   |


## AUTHOR
**Marcus Yoda
[@marcusyoda](https://github.com/marcusyoda)**  
*Prototype development, final version and testing.*    

## VERSIONING
Versioning [SemVer](http://semver.org/).  
To view the available versions, look at: [tags on this repository](https://github.com/marcusyoda/sqs-request/tags).  

## DEPENDENDENCIES:
- Proudly, running with no dependencies.  

## LICENSE:
Developed by Marcus Yoda, during javascript research and study.  
- [MIT License](https://github.com/marcusyoda/sqs-request/blob/master/LICENSE)

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