Class SourceInfo

java.lang.Object
io.debezium.connector.AbstractSourceInfo
io.debezium.connector.common.BaseSourceInfo
io.debezium.connector.binlog.BinlogSourceInfo
io.debezium.connector.mariadb.SourceInfo

@NotThreadSafe public class SourceInfo extends BinlogSourceInfo
Information about the source, which includes the position in the binary transaction log.

The source partition information describes the database whose log is being consumed. Typically, the database is identified by the host address and port number of the MariaDB server and the name of the database. Here's an example JSON representation:
     {
         "server": "production-server"
     }
 
The offset includes the binlog filename, the position of the first event in the transaction log, the number of events to skip on restart, and the number of rows to skip. An example:
     {
         "server_id": 112233,
         "ts_ms": 123456789,
         "gtid": "0-1-3",
         "file": "binlog.000003",
         "pos": 990,
         "event": 0,
         "row": 0,
         "snapshot": true
     }
 
The "snapshot" field only appears in offsets produced during the snapshot phase. The "ts_ms" field contains the milliseconds since Unix epoch (since Jan 1 1970) of the MariaDB event.

Each change event Envelope also contains a source struct that contains the MariaDB information about that specific event, including a mixture of fields from the binary log filename and position where the event can be found, GTID details, etc. Like with the offset, the "snapshot" field will only appear for events produced during the snapshot phase.

Here's a JSON example of the source metadata for an event:
     {
         "name": "production-server",
         "server_id": 112233,
         "ts_ms": 123456789,
         "gtid": "0-1-3",
         "file": "binlog.000003",
         "pos": 1081,
         "row": 0,
         "snapshot": true,
         "thread": 1,
         "db": "inventory",
         "table": "products"
     }
 
Author:
Chris Cranford