# AnyMediator > AnyMediator is a free, open-source (Apache-2.0) in-process mediator for .NET 8 and .NET 10, and an alternative to MediatR with a MediatR-compatible API. It supports requests, stream requests, notifications, pipeline behaviors, pre/post-processors, exception handlers/actions and pluggable notification sinks. Install with `dotnet add package AnyMediator`, register with `services.AddAnyMediator(cfg => cfg.RegisterServicesFromAssemblyContaining())`, and use the `AnyMediator` namespace. To migrate from MediatR: replace the package, replace `using MediatR;` and `using MediatR.Pipeline;` with `using AnyMediator;` (and `MediatR.NotificationPublishers` with `AnyMediator.NotificationPublishers`), replace `AddMediatR` with `AddAnyMediator`, and remove `LicenseKey`. Interfaces, method shapes, behavior constraints (`where TRequest : notnull`), `Send(object)`, `Publish(object)`, handlers for base notification types and generic handlers work as in MediatR. AnyMediator was published as OpenMediatR up to version 1.5.0; to upgrade, replace the OpenMediatR package with AnyMediator, `using OpenMediatR;` with `using AnyMediator;` and `AddOpenMediatR` with `AddAnyMediator`. AnyMediator is not affiliated with MediatR or Lucky Penny Software. Differences from MediatR: two handlers for the same request make `AddAnyMediator` throw instead of using the first one; `Publish` also delivers to any registered `INotificationSink` (message brokers, webhooks) and, when several sinks fail, throws an `AggregateException`. Pipeline behaviors run in registration order (first registered is outermost), as in MediatR. ## Docs - [Getting started](https://adiakys.github.io/AnyMediator/guide/getting-started): install, register, send a request - [Migrating from MediatR](https://adiakys.github.io/AnyMediator/guide/migrating-from-mediatr): the three changes and every behavioral difference - [MediatR alternatives compared](https://adiakys.github.io/AnyMediator/guide/mediatr-alternatives): AnyMediator, FreeMediator, MediatR, Mediator, LiteBus and Wolverine side by side - [Requests](https://adiakys.github.io/AnyMediator/guide/requests): IRequest, IRequestHandler, ISender.Send - [Stream requests](https://adiakys.github.io/AnyMediator/guide/stream-requests): IStreamRequest, IAsyncEnumerable, CreateStream - [Notifications](https://adiakys.github.io/AnyMediator/guide/notifications): INotification, INotificationHandler, IPublisher, publisher strategies - [Pipeline behaviors](https://adiakys.github.io/AnyMediator/guide/pipeline-behaviors): IPipelineBehavior, registration and order - [Pre- and post-processors](https://adiakys.github.io/AnyMediator/guide/processors): IRequestPreProcessor, IRequestPostProcessor - [Exception handling](https://adiakys.github.io/AnyMediator/guide/exception-handling): IRequestExceptionHandler, IRequestExceptionAction - [Notification sinks](https://adiakys.github.io/AnyMediator/guide/notification-sinks): INotificationSink for brokers and webhooks - [Configuration](https://adiakys.github.io/AnyMediator/guide/configuration): every AddAnyMediator option - [Tracing and metrics](https://adiakys.github.io/AnyMediator/guide/tracing): OpenTelemetry spans and duration histogram via AnyMediatorDiagnostics.ActivitySourceName and MeterName - [Performance](https://adiakys.github.io/AnyMediator/guide/performance): time and memory per Send and Publish compared with MediatR and Mediator ## Optional - [Full documentation as one file](https://adiakys.github.io/AnyMediator/llms-full.txt) - [Source code](https://github.com/Adiakys/AnyMediator) - [NuGet package](https://www.nuget.org/packages/AnyMediator)