Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.


Follow @CodeOpinion

CQRS

Event Stream as a Message Queue

I was recently having a discussion around a system being built using Microsoft Azure.  Some concepts being discussed for this system where CQRS, Event Sourcing and Message Queue. The diagram below is fairly typical when discussing CQRS and Event Sourcing. One of the first things that stood out to me was the use of the Message Queue and Azure Service Bus. For this blog post, I want to focus on the Service bus, which is used for publish-subscribe pattern.  The domain will emit events that are stored to the event stream and then will be published to the Service Bus.  Subscribers, such as… Read More »Event Stream as a Message Queue

How to get started with CQRS & Event Sourcing

When I first heard about CQRS & Event Sourcing concepts through various blogs and videos, primarily from Greg Young and Udi Dahan, I wanted to apply it everywhere. It seems really natural to want to take the limited knowledge we have about a new concept or technology and try and apply it to any problem. Most of us know this is a terrible idea, but we are so tempted to push the concepts on a problem that it just doesn’t fit. I realize I’m grouping CQRS and Event Sourcing together in this post.  Generally, if you are applying Event Sourcing then… Read More »How to get started with CQRS & Event Sourcing

Clean up your Domain Model with Event Sourcing

I recently had a discussion with a developer who was new to Domain Driven Design, CQRS and Event Sourcing.  They were using Greg Young’s Simple CQRS Example to create there own simple app as learning exercise. After taking a quick look at their aggregate root, one thing that immediately stood out to me was a class field that contained current state.  Why this is interesting is because this field was not in any invariant. When I first started reading and exploring Event Sourcing, this was a big “ah ha!” moment for me. The realization that only certain data within my domain model was really important. We… Read More »Clean up your Domain Model with Event Sourcing