# exframe-etl-queue

> exframe-etl-queue description

Latest version **3.1.8** (published 2026-10-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install exframe-etl-queue
pnpm add exframe-etl-queue
yarn add exframe-etl-queue
bun add exframe-etl-queue
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.1.8 |
| Published | 2026-10-29 |
| First published | 2022-04-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.0.0 |
| Dependencies | 6 |
| Unpacked size | 44 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Exzeo |
| Maintainers | exzeodevops |

## Links

- npm: https://www.npmjs.com/package/exframe-etl-queue
- Repository: https://bitbucket.org/exzeo-usa/exframe
- Homepage: https://bitbucket.org/exzeo-usa/exframe#readme
- Issues: https://bitbucket.org/exzeo-usa/exframe/issues
- npm.io page: https://npm.io/package/exframe-etl-queue

## Dependencies (6)

- [luxon](https://npm.io/package/luxon.md) ^3.4.4
- [lodash](https://npm.io/package/lodash.md) ^4.17.10
- [mongodb](https://npm.io/package/mongodb.md) ^6.5.0
- [node-object-hash](https://npm.io/package/node-object-hash.md) ^3.0.0
- [exframe-utilities](https://npm.io/package/exframe-utilities.md) ^1.0.0
- [exframe-request-validator](https://npm.io/package/exframe-request-validator.md) ^1.2.2

## Recent versions

- 3.1.8 (latest) — 2026-10-29
- 3.1.7 — 2026-07-15
- 3.1.6 — 2026-03-25
- 3.1.5 — 2026-02-05
- 3.1.4 — 2025-12-03
- 3.1.3 — 2025-11-03
- 3.1.2 — 2025-10-29
- 3.1.1 — 2025-10-29
- 3.1.0 — 2025-10-23
- 3.0.5 — 2025-10-22
- 3.0.4 — 2025-08-08
- 3.0.3 — 2025-02-28
- 3.0.2 — 2025-02-24
- 3.0.1 — 2025-02-17
- 3.0.0 — 2025-01-16
- … 40 more at https://npm.io/package/exframe-etl-queue/versions

## README

# ETL Queue

### Initialization
```
  const { EtlQueue, EtlSteps } = require('exframe-etl-queue');
  const { db } = require('./lib/db');

  const queue = new EtlQueue(logger, EtlSteps.Transform, db);
```


### Enqueue

The enqueuing of an etl message will only need to occur during the extraction process.  Messages will automatically advance to the next ETL step queue when it is acknowledged after processing.

```
  const {fullDocument, updateDescription, _id: resumeToken, operationType, clusterTime, ns: { coll: collection }} = result;
  await queue.enqueue(context, collection, fullDocument.quoteNumber, resumeToken, {
        operationType,
        operationTimestamp: clusterTime,
        fullDocument,
        updateDescription
      });
```


### Listen

The listen method accepts a callback to preform work on the message.  The messsage should be update with any new data for the downstream processes. The message will automatically be acknowledged and move to the next process status.  If an error occurs the message will automatically be placed in an error state and further processing will not occur.

```
  await queue.listen(context, async (context, message) => {
      const { documentType, documentId, date, sourceOperation: { operationType }} = message;
      message.targets = [
        { target: nanoid()}
      ];
    })
```

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