I have built an app with Feathers.js and I'm trying to find the way, how can I save any record to the multiple databases? I would like to save a "message" for example to the mysql and also to the elastic search.
I would like to use elastic search for "full text" search, but I would also like to have all data saved in some relational database.
I've created a service using:
feathers generate service
but I can select only one specific database there.
Any help will be really appreciated.
Fast way to me is to create another feathers app (microservice) for elasticsearch and post the data to elasticsearch too. If you are using socket in the frontend app you can define 2 sockets (1 for each micro service). When you post new data to feathers app 1 (mysql) you can :
or