1.1.1 • Published 2 months ago

@txrx/redis-streamer v1.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

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
1.1.1

2 months ago

1.1.0

3 months ago

1.0.1

3 months ago

1.0.0

3 months ago