To get started, you will definitely want the denormalizer to be placed in a separate process. From there, you can publish the domain to your messaging infrastructure with events occurring in the domain. One simple strategy to help speed up denormalization is to break things down by message / event type. In other words, you can create a separate queue for each type of message, and then bind the denormalizer (using the message bus) to the corresponding events. The advantage of this is that you do not have messages folding one after another - everything starts working in parallel. The only places where you might have a conflict are tables that listen to several types. However, you now distribute the load between many endpoints.
As long as you use some kind of messaging infrastructure, you will not lose event messages when trying to denormalize. Instead, after a number of retry attempts, the message will be considered βpoisonβ and move to the error queue. Just monitor the error queue for problems. Once the message is in the error queue, you can check your logs to see why they are there, fix the problem, and then move it.
Another consideration is that the example of Mark Nijhof is somewhat old. There are several CQRS features, as well as tips in the DDD / CQRS of the Google Group .
source share