DEV Community

Der Sascha
Der Sascha

Posted on

How to cqrs with message bus

Hey, I try to create an application with the cqrs pattern in. Net. So I use mediatr as command and query invoker.

This works very well for now. But I think that is to right coupled Between the Modules. Because I have one base application that serve some webapi Controllers and using nuget (satelite) pakages that contains the desired command and query Object and also the handler. These package will be tested independently.

So my idea was to use any Bus system(asb, rabbitmq..) for "sending" messages (command and queries) between the Module.

Is there any kind of good toolkit / Pattern /Way for this?

Or are I am on a wrong path for this and do a wrong descision?

Top comments (2)

Collapse
 
saschadev profile image
Der Sascha

Yep I know that. So where and how the command and queries will distributed doesn't matter? That comes to the point if there is a good toolkit like mediatr that Support a message Bus as message Transport. Or must I build it really on my own?

 
saschadev profile image
Der Sascha

Nice thx that points me in the right dirction. I think this can be become very complex. Thx alot for your Suggestion 👍