Leveraging change data capture
Let’s change gears a little bit. Up to this point in this chapter, we have primarily focused on the downstream consume and query side of the CPCQ flow. Now, we will look into the upstream command and publish side of the CPCQ flow and how it intersects with the system-wide Event Sourcing pattern that we introduced in Chapter 4, Trusting Facts and Eventual Consistency.
In the Turning the database inside out section, we learned that splitting data out into multiple databases creates the need for a system-wide transaction log. We fulfill this need with the Event Sourcing pattern and the event lake. Each autonomous subsystem plays its role by providing an event hub service to collect events and an event lake service to store them. Individual autonomous services play their part by publishing events to the hub as their state changes.
Each individual database still has its own transaction log, and we leverage it as a powerful tool. Change Data...