# @bakerstreet-industries/bus-sqs

> An AWS SQS transport adapter for @node-ts/bus-core.

Latest version **1.0.16** (published 2022-02-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @bakerstreet-industries/bus-sqs
pnpm add @bakerstreet-industries/bus-sqs
yarn add @bakerstreet-industries/bus-sqs
bun add @bakerstreet-industries/bus-sqs
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.16 |
| Published | 2022-02-12 |
| First published | 2022-02-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 73.2 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | roustalski |
| Keywords | esb, SQS, typescript, enterprise integration patterns, bus, messaging, microservices, distributed systems, framework, enterprise framework, CQRS, ES, NServiceBus, Mule ESB |

## Links

- npm: https://www.npmjs.com/package/@bakerstreet-industries/bus-sqs
- Repository: https://github.com/bakerstreet-industries/bus
- Homepage: https://github.com/bakerstreet-industries/bus#readme
- Issues: https://github.com/bakerstreet-industries/bus/issues
- npm.io page: https://npm.io/package/@bakerstreet-industries/bus-sqs

## Dependencies (4)

- [uuid](https://npm.io/package/uuid.md) ^3.3.2
- [tslib](https://npm.io/package/tslib.md) ^1.9.3
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.834.0
- [@node-ts/bus-messages](https://npm.io/package/@node-ts/bus-messages.md) ^1.0.4

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 1.0.16 (latest) — 2022-02-12

## README

# @node-ts/bus-sqs

An Amazon SQS transport adapter for [@node-ts/bus](https://bus.node-ts.com)

🔥 View our docs at [https://bus.node-ts.com](https://bus.node-ts.com) 🔥

🤔 Have a question? [Join our Discord](https://discord.gg/Gg7v4xt82X) 🤔

## Installation

Install packages and their dependencies

```bash
npm i @node-ts/bus-sqs @node-ts/bus-core
```

Once installed, configure Bus to use this transport during initialization:

```typescript
import { Bus } from '@node-ts/bus-core'
import { SqsTransport, SqsTransportConfiguration } from '@node-ts/bus-sqs'

const sqsConfiguration: SqsTransportConfiguration = {
  awsRegion: process.env.AWS_REGION,
  awsAccountId: process.env.AWS_ACCOUNT_ID,
  queueName: `my-service`,
  deadLetterQueueName: `my-service-dead-letter`
}
const sqsTransport = new SqsTransport(sqsConfiguration)

// Configure Bus to use SQS as a transport
const run = async () => {
  await Bus
    .configure()
    .withTransport(sqsTransport)
    .initialize()
}
run.catch(console.error)
```

## Development

Local development can be done with the aid of docker to run the required infrastructure. To do so, run:

```bash
docker run -e SERVICES=sqs,sns -e DEFAULT_REGION=us-east-1 -p 4566-4583:4566-4583 localstack/localstack
```
This will create a localstack instance running and exposing a mock sqs/sns that's compatible with the AWS-SDK. This same environment is used when running integration tests for the `SqsTransport`.

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