I am using @rodrigogs/mysql-events to listen to DB events on an mysql DB. So far works pretty well, except that I am getting the following error when I have more than one client listening to the DB:
A slave with the same server_uuid/server_id as this slave has connected to the master
Through some research I was told that each client are seen as replication servers by the core server, and as such must each present a different serverId in order to avoid collision.
As per the @rodrigogs/mysql-events documentation, I did pass the "serverID" option as shown below, but the errors continue to happen, and the binlog only reports connections from Server ID 2. What am I missing?
const instance = new MySQLEvents(DBcon, {
startAtEnd: true,
serverId: 5,
excludedSchemas: {
mysql: true,
}
});