Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可能会使用 NService 总线,我知道事件调度程序会将事件发布给订阅者,但我想知道在第一个实例中发布命令是否正确?
发布和发布/订阅工作流程对事件有意义,但是命令意味着只有一个处理器,因此应该“发送”而不是发布。除了 pub/sub,NServiceBus 还支持这个概念。
另请注意,在 CQRS 架构中,查询不是命令,因此不适合与 NServiceBus 一起使用。