Open gtsamtsouris opened 1 year ago
Hi
You should ensure that only one instance of an event handler is processing events. In my own apps I use database locks to guarantee this.
Hi @Seikho, I'd like to explore more on the use of database locks. How did you implement this? or any pointers on what I have to research more on this. Thank you. I've used your library in production.
What database are you using? I mostly use Postgres and MongoDB and have a mutex implementation for both.
Thanks for the reply, I'm using MySQL 8
I'd start by doing something like this: https://github.com/n8j1s/node-mysql-semaphore/blob/master/lib/mysql-semaphore.js
Does multiple instances of event handler ensure that events will be processed with correct order?