Registry / storage / elastic-queue

elastic-queue

JSON →
library0.3.0jsnpmunverified

A batching queue for Elasticsearch Node.js client, version 0.3.0 (stable, last release 2015). It batches documents into bulk requests, supporting configurable concurrency, batch size, commit timeout, and rate limiting. Provides event listeners for drain, task, and batchComplete. Lightweight but unmaintained, not compatible with modern Elasticsearch client (v7+).

storage
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CJS only; no ESM or named exports.

const ElasticQueue = require('elastic-queue')

Must use 'new' keyword.

const queue = new ElasticQueue(...)

Options must be nested under 'elasticsearch.client'. Note typo 'concurency' (double c).

{ elasticsearch: { client: { host: 'localhost:9200' } }, concurency: 1, batchSize: 500 }

Creates an ElasticQueue with configurable host, pushes a single document, and listens for drain.

const ElasticQueue = require('elastic-queue'); const queue = new ElasticQueue({ elasticsearch: { client: { host: process.env.ELASTICSEARCH_HOST ?? 'localhost:9200' } }, batchSize: 100, commitTimeout: 1000 }); queue.on('drain', () => { console.log('Queue drained'); queue.close(); }); queue.push({ index: 'products', type: '_doc', id: 1, body: { title: 'Test' } });
Debug
Known footguns
deprecatedPackage is unmaintained since 2015 and incompatible with Elasticsearch client v7+.
breakingTypo in option name: 'concurency' instead of 'concurrency'. Setting 'concurrency' will have no effect.
gotchaNo ESM support; cannot import with 'import' in Node.js without transpilation.
gotchaThe 'type' parameter in documents is required but deprecated in Elasticsearch 7+; should be '_doc' or omitted.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
18 hits · last 30 days
amazonbot
4
gptbot
3
dotbot
1
bingbot
1
ahrefsbot
1
Resources