AdaskoTheBeAsT.MediatR.SimpleInjector and AdaskoTheBeAsT.MediatR.SimpleInjector.AspNetCore alternatives and similar packages
Based on the "Queue" category.
Alternatively, view AdaskoTheBeAsT.MediatR.SimpleInjector and AdaskoTheBeAsT.MediatR.SimpleInjector.AspNetCore alternatives based on common mentions on social networks and blogs.
-
Hangfire
An easy way to perform background job processing in your .NET and .NET Core applications. No Windows Service or separate process required -
CAP
9.4 7.2 AdaskoTheBeAsT.MediatR.SimpleInjector and AdaskoTheBeAsT.MediatR.SimpleInjector.AspNetCore VS CAPDistributed transaction solution in micro-service base on eventually consistency, also an eventbus with Outbox pattern -
MassTransit
Distributed Application Framework for .NET -
Confluent's .NET Client for Apache KafkaTM
Confluent's Apache Kafka .NET client -
NetMQ
8.6 3.1 L3 AdaskoTheBeAsT.MediatR.SimpleInjector and AdaskoTheBeAsT.MediatR.SimpleInjector.AspNetCore VS NetMQA 100% native C# implementation of ZeroMQ for .NET -
EasyNetQ
An easy to use .NET API for RabbitMQ -
NServiceBus
The most popular service bus for .NET -
RabbitMQ.NET
RabbitMQ .NET client for .NET Standard 2.0+ and .NET 4.6.1+ -
Rebus
7.7 6.5 L4 AdaskoTheBeAsT.MediatR.SimpleInjector and AdaskoTheBeAsT.MediatR.SimpleInjector.AspNetCore VS Rebus:bus: Simple and lean service bus implementation for .NET -
Brighter
A framework for building messaging apps with .NET and C#. -
CQRSlite
A lightweight framework to help creating CQRS and Eventsourcing applications in C# -
RawRabbit
A modern .NET framework for communication over RabbitMq -
Kafka Client
.Net implementation of the Apache Kafka Protocol that provides basic functionality through Producer/Consumer classes. -
Gofer.NET
Easy C# API for Distributed Background Tasks/Jobs for .NET Core. -
RestBus
Easy, Service Oriented, Asynchronous Messaging and Queueing for .NET -
Kafunk
4.3 1.7 AdaskoTheBeAsT.MediatR.SimpleInjector and AdaskoTheBeAsT.MediatR.SimpleInjector.AspNetCore VS KafunkF# Kafka client from Jet -
SlimMessageBus
Lightweight message bus interface for .NET (pub/sub and request-response) with transport plugins for popular message brokers. -
Enexure.MicroBus
MicroBus is a simple in process Mediator for .NET -
Silverback
Silverback is a simple but feature-rich message bus for .NET core (it currently supports Kafka, RabbitMQ and MQTT). -
Darker
3.1 2.3 AdaskoTheBeAsT.MediatR.SimpleInjector and AdaskoTheBeAsT.MediatR.SimpleInjector.AspNetCore VS DarkerThe query-side counterpart of Brighter -
Shuttle.Esb
A highly extensible service bus implementation.
Build time-series-based applications quickly and at scale.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of AdaskoTheBeAsT.MediatR.SimpleInjector and AdaskoTheBeAsT.MediatR.SimpleInjector.AspNetCore or a related project?
Popular Comparisons
-
AdaskoTheBeAsT.MediatR.SimpleInjector and AdaskoTheBeAsT.MediatR.SimpleInjector.AspNetCorevsRebus
-
AdaskoTheBeAsT.MediatR.SimpleInjector and AdaskoTheBeAsT.MediatR.SimpleInjector.AspNetCorevsEasyNetQ
-
AdaskoTheBeAsT.MediatR.SimpleInjector and AdaskoTheBeAsT.MediatR.SimpleInjector.AspNetCorevsKafka Client
-
AdaskoTheBeAsT.MediatR.SimpleInjector and AdaskoTheBeAsT.MediatR.SimpleInjector.AspNetCorevsHangfire
-
AdaskoTheBeAsT.MediatR.SimpleInjector and AdaskoTheBeAsT.MediatR.SimpleInjector.AspNetCorevsBrighter
README
AdaskoTheBeAsT.MediatR.SimpleInjector and AdaskoTheBeAsT.MediatR.SimpleInjector.AspNetCore
MediatR extensions for SimpleInjector.
Badges
Usage in AspNetCore
Scans assemblies and adds handlers, preprocessors, and postprocessors implementations to the SimpleInjector container. Additionaly it register decorator which passes HttpContext.RequestAborted cancellation token from asp.net core controllers to MediatR.
Install package AdaskoTheBeAsT.MediatR.SimpleInjector.AspNetCore
.
There are few options to use with Container
instance:
Marker type from assembly which will be scanned
container.AddMediatRAspNetCore(typeof(MyHandler), type2 /*, ...*/);
Assembly which will be scanned
container.AddMediatRAspNetCore(assembly, assembly2 /*, ...*/);
Full configuration
var testMediator = new Mock<IMediator>(); container.AddMediatR( cfg => { cfg.Using(() => testMediator.Object); cfg.WithHandlerAssemblyMarkerTypes(typeof(MyMarkerType)); cfg.UsingBuiltinPipelineProcessorBehaviors(true); cfg.UsingPipelineProcessorBehaviors(typeof(CustomPipelineBehavior<,>)); cfg.UsingStreamPipelineBehaviors(typeof(CustomStreamPipelineBehavior<,>)); });
Usage in other project types
Scans assemblies and adds handlers, preprocessors, and postprocessors implementations to the SimpleInjector container.
Install package AdaskoTheBeAsT.MediatR.SimpleInjector
.
There are few options to use with Container
instance:
Marker type from assembly which will be scanned
container.AddMediatR(typeof(MyHandler), type2 /*, ...*/);
List of assemblies which will be scanned.
Below is sample for scanning assemblies from some solution.
```cs
[ExcludeFromCodeCoverage]
public static class MediatRConfigurator
{
private const string NamespacePrefix = "YourNamespace";
public static void Configure(Container container)
{
var loadedAssemblies = AppDomain.CurrentDomain.GetAssemblies().ToList();
var assemblies = new List<Assembly>();
var mainAssembly = typeof(MediatRConfigurator).GetTypeInfo().Assembly;
var refAssemblies = mainAssembly.GetReferencedAssemblies();
foreach (var assemblyName in refAssemblies
.Where(a => a.FullName.StartsWith(NamespacePrefix, StringComparison.OrdinalIgnoreCase)))
{
var assembly = loadedAssemblies.Find(l => l.FullName == assemblyName.FullName)
?? AppDomain.CurrentDomain.Load(assemblyName);
assemblies.Add(assembly);
}
container.AddMediatR(assemblies);
}
}
```
This will register:
IMediator
as SingletonIRequestHandler<>
concrete implementations as TransientINotificationHandler<>
concrete implementations as TransientIStreamRequestHandler<>
concrete implementations as Transient
Advanced usage
Setting up custom IMediator
instance and marker type from assembly for unit testing (Moq sample)
var testMediator = new Mock<IMediator>();
container.AddMediatR(
cfg =>
{
cfg.Using(() => testMediator.Object);
cfg.WithHandlerAssemblyMarkerTypes(typeof(MyMarkerType));
});
Setting up custom IMediator
implementation and marker type from assembly
container.AddMediatR(
cfg =>
{
cfg.Using<MyCustomMediator>();
cfg.WithHandlerAssemblyMarkerTypes(typeof(MyMarkerType));
});
Setting up custom IMediator
implementation and assemblies to scan
container.AddMediatR(
cfg =>
{
cfg.Using<MyCustomMediator>();
cfg.WithAssembliesToScan(assemblies);
});
Setting assemblies to scan and different lifetime for IMediator implementation
container.AddMediatR(
cfg =>
{
cfg.WithAssembliesToScan(assemblies);
cfg.AsScoped();
});
Setting assemblies to scan and additonaly enabling all builtin behaviors and user defined processors/handlers
This will register following behaviors:
RequestPreProcessorBehavior<,>
RequestPostProcessorBehavior<,>
RequestExceptionProcessorBehavior<,>
RequestExceptionActionProcessorBehavior<,>
and all user defined implementation of processors and handlers:
IRequestPreProcessor<>
IRequestPostProcessor<,>
IRequestExceptionHandler<,,>
IRequestExceptionActionHandler<,>
container.AddMediatR(
cfg =>
{
cfg.WithAssembliesToScan(assemblies);
cfg.UsingBuiltinPipelineProcessorBehaviors(true);
});
Setting assemblies to scan and additonaly enabling choosen builtin behaviors and user defined processors/handlers
This will register following behaviors:
RequestPreProcessorBehavior<,>
RequestExceptionProcessorBehavior<,>
and all user defined implementation of processors and handlers:
IRequestPreProcessor<>
IRequestExceptionHandler<,,>
container.AddMediatR(
cfg =>
{
cfg.WithAssembliesToScan(assemblies);
cfg.UsingBuiltinPipelineProcessorBehaviors(
requestPreProcessorBehaviorEnabled: true,
requestPostProcessorBehaviorEnabled: false,
requestExceptionProcessorBehaviorEnabled: true,
requestExceptionActionProcessorBehaviorEnabled: false);
});
Setting assemblies to scan and additonaly custom stream request handlers behaviors
This will register following stream behaviors:
CustomStreamPipelineBehavior<,>
container.AddMediatR(
cfg =>
{
cfg.WithAssembliesToScan(assemblies);
cfg.UsingStreamPipelineBehaviors(typeof(CustomStreamPipelineBehavior<,>));
});
Setting assemblies to scan and additonaly enabling choosen builtin behaviors and user defined processors/handlers also with custom Pipeline Process Behaviours
container.AddMediatR(
cfg =>
{
cfg.WithAssembliesToScan(assemblies);
cfg.UsingBuiltinPipelineProcessorBehaviors(
requestPreProcessorBehaviorEnabled: true,
requestPostProcessorBehaviorEnabled: false,
requestExceptionProcessorBehaviorEnabled: true,
requestExceptionActionProcessorBehaviorEnabled: false);
cfg.UsingPipelineProcessorBehaviors(typeof(CustomPipelineBehavior<,>));
});
Thanks to
- Jimmy Boggard for MediatR
- Steven van Deursen for SimpleInjector
- Sebastian Kleinschmager for idea of automatic passing RequestAborted to MediatR
- Konrad Rudolph for idea of IsAssignableToGenericType
Code originates from MediatR.Extensions.Microsoft.DependencyInjection and was changed to work with SimpleInjector.