CQRS - Multiple command/query-handlers inside eachother

c#, cqrs

Solution

CQRS is an architectural pattern of applying the Single Responsibility Principle which separates the querying from command processing by providing two models(read and write models) instead of one. Thus, it will be a wrong use of the pattern if you use multiple queryhandlers and/or commandhandlers in each other.

This pattern can enable you to scale if you have a very high number of reads. Thus, it is also not an architectural pattern to apply in all bounded contexts of a system.

Problem

Is it a good practice in CQRS to use multiple queryhandlers and/or commandhandlers in each other? Or should you only have one per use-case? - Commandhandlers in a commandhandler - Queryhandlers in a commandhandler - Queryhandlers in a queryhandler - Commandhandlers in a queryhandler -> personally, I wouldn't do this, because you won't expect a query should change data... Correct?

Original source