@txrx/redis-streamer
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

txrx-redis-streamer

A Redis streamer implementation.

Synopsis

A simple class that issues XADD commands.

Streamable

This type defines the item to be streamed.

  • maxlen - defines the MAXLEN of the stream
  • payload - a simple string to string mapping, containing all the data attached to the message to be streamed.

Usage

const streamer = new Streamer('redis://127.0.0.1:6379');

(async() {
    await streamer.stream({
        stream: 'MY_STREAM',
        number: 100000,
        paylod: {
            a: JSON.stringify({
                b: 1,
                c: 'test',
                d: {
                    e: 'f',
                },
            }),
            g: 'h',
        }
    });
})();

Devel

Dev container is recommended, to run the devel container:

make build
make install

CI

The workflow runs:

make test

Or separately:

Tests

make jest

Linter

make syntax

Readme

Keywords

none

Package Sidebar

Install

npm i @txrx/redis-streamer

Weekly Downloads

0

Version

1.1.1

License

ISC

Unpacked Size

10.5 kB

Total Files

18

Last publish

Collaborators

  • zelk-zelk