I don’t think you’re correct in your statement.

In the documentation it says:

MediatR has two kinds of messages it dispatches:

  • Request/response messages, dispatched to a single handler.
  • Notification messages, dispatched to multiple handlers.


Notification messages are handled by one or more handlers and a command, by definition will always be consumed by a single handler.

Therefore, in MediatR request/response messages are intended for commands and notification messages are widely used for events in general.

What could be done in this case is to inherit from AsyncRequestHandler (which internally returns a Unit and exposes a method that returns a Task) instead of implement the interface IRequestHandler.

Software Engineer and passionate about distributed systems

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store