MySQL-based coordination storage backend for QTopology distributed topology framework. Version 2.2.1 is the current stable release. It provides database schema initialization, upgrade scripts, and stored procedures for managing worker registration, leader election, topology tracking, and message queues. Key differentiator: it handles schema migration automatically on instantiation, similar to Flyway-like versioning. The library ships with TypeScript declarations and is intended for use with Node.js environments running MySQL 5.7+.
npm install qtopology-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes MySQL storage connection and schema, then fetches the current topology leader.
Replace callback-based initialization with async/await pattern.
Ensure the MySQL user has sufficient privileges to run DDL statements during initialization.
Use mysql2/promise and create a single connection instance, not a pool, for storage operations.
Do not manually modify stored procedures; they are managed by the package.
Grant necessary privileges: GRANT ALL ON qtopology.* TO 'user'@'host';
Ensure a valid mysql2 connection object is passed: new MySqlCoordinationStorage(connection).
Stop the conflicting process or change MySQL port in connection config.