Reputation: 983
My application's primary database is MySQL
and I use MongoDB
as a buffer/secondary database.
So when there is a save/update operation in the MySQL, for certain cases, some part of the data is also pushed into the Mongo datbase.
The problem that I am facing is that after I try the save/update operation in MySQL, if the later insert/update operation into the MongoDB failed, I don't have way to bring it back in sync.
Is there a way by which I can achieve this synchronization ?
Upvotes: 0
Views: 1165
Reputation: 2128
If your application can tolerate the delay in update to mongodb, push a message to some QUEUE process and have a listener which does retries to save it to mongodb. All implementation depends on language and frameworks you are using.
Upvotes: 1