1.0.11 • Published 4 months ago

binlog-triggers-mysql v1.0.11

Weekly downloads
4
License
MIT
Repository
github
Last release
4 months ago

API for listening to MySQL binlog events.

Overview

This library provides API for listening to binlog events. Events can be filtered by table name and/or operation type (insert, delete etc.)

Usage example

import {BinlogTriggers, DbConfig} from "binlog-triggers-mysql"

const binlogTriggers = new BinlogTriggers()

binlogTriggers.table("test", {
  insert: (rows) => {
    console.log("Got new rows", rows)
    countRows++
  }
})

binlogTriggers.start({
  database: "binlog_demo",
  host: "localhost",
  password: "test",
  user: "test",
  port: 3306,
})

Implementation details

To parse MySQL binlog messages, it uses https://github.com/nevill/zongji .

In addition to API binlog-triggers-mysql also provides MySQL reconnect. It is useful on network issues or MySQL server restarts.

1.0.11

4 months ago

1.0.9

5 months ago

1.0.10

5 months ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

4 years ago

1.0.2

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago