kinesis-console-consumer

1.8.0 • Public • Published

Kinesis Console Consumer

Build Status npm version Coverage Status

The [Kafka quickstart] demos a simple consumer so you can quickly inspect your Kafka stream. Unfortunately, there is no equivalent for AWS Kinesis...

Until now.

Usage

npm install [-g] kinesis-console-consumer

kinesis-console-consumer <stream_name>

Help

$ kinesis-console-consumer --help

  Usage: kinesis-console-consumer [options] <stream_name>

  Options:

    -V, --version                   output the version number
    --list                          Just list all streams and exit
    --type-latest                   (DEFAULT) start reading any new data (LATEST)
    --type-oldest                   start reading from the oldest data (TRIM_HORIZON)
    --type-at <sequence_number>     start reading from this sequence number (AT_SEQUENCE_NUMBER)
    --type-after <sequence_number>  start reading after this sequence number (AFTER_SEQUENCE_NUMBER)
    --type-timestamp <timestamp>    start reading after this time (units: epoch seconds) (AT_TIMESTAMP)
    --no-new-line                   Don't print a new line between records (default: true)
    --regex-filter <regexFilter>    filter data using this regular expression
    --unzip                         Unzip each record before printing
    -h, --help                      output usage information

Examples

List Kinesis streams:

kinesis-console-consumer

Display contents of a stream, "hello-world", starting from 15 minutes ago:

kinesis-console-consumer 'hello-world' --type-timestamp "$(($(date +%s) - 900))"

Only display records that have something that looks like an IP address. NOTE: grep is preferred, but not all platforms have it.

kinesis-console-consumer 'hello-world' --regex-filter "\d+\.\d+\.\d+\.\d+"

/kinesis-console-consumer/

    Package Sidebar

    Install

    npm i kinesis-console-consumer

    Weekly Downloads

    11

    Version

    1.8.0

    License

    Apache-2.0

    Unpacked Size

    36.5 kB

    Total Files

    9

    Last publish

    Collaborators

    • crccheck