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 query side of the systemwide CQRS pattern. Now we will look into the upstream command side of the systemwide CQRS pattern and how it intersects with the systemwide 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 systemwide 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 Capture...