What is the difference between IDispatcher and ICommandProcessor? #1469
Unanswered
mehdihadeli
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi @mehdihadeli, The CommandProcessor take your request and routes it to one or more handlers. On a Send or Publish these are in process. On a Call or Post these are out-of-process and go over middleware (RMQ, Kafka, ASB etc.) The Dispatcher lets you listen for a message on middleware (RMQ, Kafka, ASB etc) and routes it, using the CommandHandler, to a handler. So Dispatcher runs a message pump that listens for incoming messages in the same way that ASP.NET listens for HTTP messages and routes them to a Controller. If you don't want to use middleware, you just need the CommandProcessor |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @iancooper,
What is your purpose for defining these two separate classes
Dispatcher
andCommandProcessor
, for dispatching mechanism?I think
CommandProcessor
itself is enough!In my case I don't want to use message brokers and I want to dispatch command to a command handler.
Beta Was this translation helpful? Give feedback.
All reactions