# @clickheredigital/amqp

> AMQP Client for RabbitMQ processing

Latest version **1.1.4** (published 2023-03-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @clickheredigital/amqp
pnpm add @clickheredigital/amqp
yarn add @clickheredigital/amqp
bun add @clickheredigital/amqp
```

## 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.1.4 |
| Published | 2023-03-08 |
| First published | 2022-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 11.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Click Here Digital |
| Maintainers | chdengineering, rrandall91 |
| Keywords | amqp, rabbitmq, message, queue, publish, subscribe, pubsub |

## Links

- npm: https://www.npmjs.com/package/@clickheredigital/amqp
- Repository: https://github.com/clickheredigital/node-amqp
- Homepage: https://github.com/clickheredigital/node-amqp#readme
- Issues: https://github.com/clickheredigital/node-amqp/issues
- npm.io page: https://npm.io/package/@clickheredigital/amqp

## Dependencies (1)

- [amqplib](https://npm.io/package/amqplib.md) ^0.10.3

## 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.1.4 (latest) — 2023-03-08
- 1.1.3 — 2023-03-08
- 1.1.2 — 2023-02-07
- 1.1.1 — 2023-02-07
- 1.1.0 — 2022-03-07
- 1.0.0 — 2022-03-05

## README

# AMQP

This library provides a shortcut for interacting with an AMQP-based message queue (RabbitMQ, for example).

## Getting Started

### Installation

```bash
npm i @clickheredigital/amqp
```

### Usage

```javascript
import { Publisher } from "./src";

(async () => {
  const pub: Publisher = new Publisher("amqp://localhost");

  try {
    // initialize the connection
    await pub.connect();

    // send a message to the AMQP message queue
    // the send function takes optional parameters `queueOpts` and `messageOpts`
    await pub.send("test", JSON.stringify({ message: "hello world" }));
  } catch (error) {
    console.error(error);
  } finally {
    // close the connection
    await pub.close();
  }
})();
```

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