I'm currently playing around with a CQRS implementation and I'm having some trouble understanding the following concept:
Event Bus for publishing update events (required): Whenever the write database is updated, a change notification is published as an event on the event bus. Interested parties can subscribe to the event bus to be notified when the database is updated. One such party is an event processor for the query database, which receives update events and processes them by updating the query database accordingly. In this way, every time the write database is updated, a corresponding update is made to the read database to keep it in sync. source
How does an event processor actually know how the database is going to be accessed by a read service?
Let's say I have a read service that accepts queries from the outside world. It retrieves data to satisfy this request from some kind of key-value database, reading specific keys according to some read-side data model / schema (could be protobuf, graphql, etc).
Does this schema need to be shared with the event processor in order for it to know which keys to write to? If so, doesn't this introduce tight coupling between the event processor and the read service? Among other problems, I will now need to worry about the order of deployment of these services, making sure that if I ever update the read model, the event processing service is deployed before the read service (or else the read service may read from keys which are never written to).
Am I fundamentally misunderstanding something about how this typically works?