1.0.11 • Published 1 year ago

binlog-triggers-mysql v1.0.11

Weekly downloads
4
License
MIT
Repository
github
Last release
1 year 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

1 year ago

1.0.9

2 years ago

1.0.10

2 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

5 years ago

1.0.2

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago