# luckypennysoftware/mediatr

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/luckypennysoftware-mediatr).**

11,840 stars · 2,196 forks · C# · NOASSERTION

## Links

- GitHub: https://github.com/LuckyPennySoftware/MediatR
- awesome-repositories: https://awesome-repositories.com/repository/luckypennysoftware-mediatr.md

## Topics

`hacktoberfest`

## Description

MediatR is a .NET mediator pattern library that serves as an in-process message broker. It decouples message senders from handlers by using a central mediator to route requests, commands, and events.

The system functions as a request-response dispatcher that routes single requests to dedicated handlers and an event publisher that broadcasts notifications to multiple decoupled handlers for simultaneous processing. It also provides pipeline behavior middleware to execute shared pre- and post-processing logic across incoming messages.

The library handles in-process message dispatching and decoupled message routing, enabling request-response handling and asynchronous event broadcasting. These capabilities allow for cross-cutting pipeline logic to be applied to the communication flow.

## Tags

### Software Engineering & Architecture

- [Mediator Patterns](https://awesome-repositories.com/f/software-engineering-architecture/behavioral-design-patterns/mediator-patterns.md) — Provides a comprehensive implementation of the mediator pattern to decouple message senders from handlers in .NET.
- [Decoupled Message Delivery](https://awesome-repositories.com/f/software-engineering-architecture/decoupled-message-delivery.md) — Eliminates direct references between message senders and receivers using a mediator for routing.
- [Decoupled Request Handling](https://awesome-repositories.com/f/software-engineering-architecture/decoupled-request-handling.md) — Processes a single request through a dedicated handler and returns a specific result to the caller.
- [Dependency Injection Containers](https://awesome-repositories.com/f/software-engineering-architecture/dependency-injection-containers.md) — Resolves message handlers from a service container to decouple senders from specific receiver implementations.
- [Notification Broadcasting](https://awesome-repositories.com/f/software-engineering-architecture/notification-broadcasting.md) — Broadcasts a single notification to all registered handlers, allowing multiple components to react to the same event.
- [Pipeline Behavior Frameworks](https://awesome-repositories.com/f/software-engineering-architecture/pipeline-behavior-frameworks.md) — Implements a framework for intercepting and processing messages through a sequence of custom reusable behaviors.
- [Composable Middleware Pipelines](https://awesome-repositories.com/f/software-engineering-architecture/request-interception-middleware/composable-middleware-pipelines.md) — Provides a chain of decorators to execute shared pre and post processing logic for all requests.
- [Async Flow Patterns](https://awesome-repositories.com/f/software-engineering-architecture/asynchronous-task-managers/async-flow-patterns.md) — Implements asynchronous request and notification handling using the .NET Task-based asynchronous pattern.
- [Cross-Cutting Concern Automations](https://awesome-repositories.com/f/software-engineering-architecture/cross-cutting-concern-automations.md) — Automates cross-cutting concerns like logging and validation by wrapping request handlers in a pipeline.

### Networking & Communication

- [In-Process Message Routing](https://awesome-repositories.com/f/networking-communication/in-process-message-routing.md) — Routes messages to dedicated handlers within a single application process to eliminate direct dependencies.
- [In-Process](https://awesome-repositories.com/f/networking-communication/message-brokers/in-process.md) — Functions as a lightweight in-process broker for dispatching messages between components without direct dependencies.
- [Event Systems](https://awesome-repositories.com/f/networking-communication/event-systems.md) — Acts as an event system that broadcasts notifications to multiple decoupled handlers for simultaneous processing.

### Web Development

- [In-Process Request Dispatchers](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/http-request-handling/in-process-request-dispatchers.md) — Routes internal application requests to a single handler and returns the corresponding result.

### Programming Languages & Runtimes

- [Type-Safe Dispatching](https://awesome-repositories.com/f/programming-languages-runtimes/generic-types/type-safe-dispatching.md) — Uses generic type constraints to guarantee that handlers return the specific response type expected by the caller.
