Say you have a bunch of microservices each accessing dedicated databases. Due to business logic reasons, data from some DBs need to be replicated to other DBs (e.g. to serve as local cache).
One way to handle replication is to stream changes done to DB 1 (e.g. using my Debezium) into a queue (e.g. Kafka). Queue consumer then applies those changes to DB 2.
Problem is: what if queue fails temporarily? Or if DB 2 needs to be recreated from scratch due to a catastrophic failure?
The only solution I can think of is to make periodic snapshots of DB 1 and publish these snapshots in the same queue. DB 2 can be rebuilt from that snapshots plus event that happened after it. Does that make sense?