Singleton (?) MySQL Binary watcher

Hi,

It’s been a while. Still happily using Nameko, with no problems to report :slight_smile:

I’m looking at adding a MySQL binary log watcher to our services. The use-case is to monitor specific MySQL tables for activity and trigger ElasticSearch updates accordingly.

I have a POC working using python-mysql-replication

What I’d really like to do, is feed the rows into the Nameko stack so that I can leverage existing services.

So my question is - what is the “correct” way of starting the stream listener in python-mysql-replication? It has to run only once, and should be blocking.

If there’s no easy solution, I can go a different route and have the binary log watcher run depart and feed the rows into a queue (Redis or whatever) that I have Nameko workers monitoring.

Many thanks for Nameko! and for any advice on my issue,

Geoff