EventFlux 1.1.5

dotnet add package EventFlux --version 1.1.5
                    
NuGet\Install-Package EventFlux -Version 1.1.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EventFlux" Version="1.1.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EventFlux" Version="1.1.5" />
                    
Directory.Packages.props
<PackageReference Include="EventFlux" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EventFlux --version 1.1.5
                    
#r "nuget: EventFlux, 1.1.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=EventFlux&version=1.1.5
                    
Install EventFlux as a Cake Addin
#tool nuget:?package=EventFlux&version=1.1.5
                    
Install EventFlux as a Cake Tool
EventFlux

EventFlux is a lightweight, event-driven event handler library for .NET 8.0.
EventFlux is a lightweight, event-driven event handler library for .NET 8.0. It provides a simple way to trigger multiple events and handle them efficiently

Features
  • Event-Based Architecture: Easily trigger and handle multiple events.
  • Automatic Event Handler Discovery: Scans assemblies and registers handlers automatically.
  • Lightweight & High Performance: Built for .NET 8.0 applications.
  • Deferred Event Execution: Collect events in a list and trigger them all at once for optimized processing and better control over execution flow.
  • Multiple Event Handlers Support: A single event can trigger multiple handlers.
  • Pipeline Behaviors Support: Add custom middleware like logging, validation, and caching to the event processing pipeline.
  • Dynamic Event Dispatching: Route events dynamically to different handlers.
Installation

You can install EventFlux via NuGet Package Manager:

Injection
var builder = WebApplication.CreateBuilder(args);

// optionals
//builder.Services.AddEventLogging();
//builder.Services.AddEventTimeout();
builder.Services.AddEventBus(AssemblyReference.Assemblies).AddEventLogging().AddEventTimeout();

builder.Services.AddEventDispatcher();

var app = builder.Build();
app.Run();
Use Example
 public class ExampleController(IEventBus _eventBus) : ControllerBase
 {
     [HttpPost("create-user")]
     public async Task<IActionResult> CreateUser([FromBody] CreateUserCommandRequest command)
     {
         CreateUserCommandResponse response = await _eventBus.SendAsync(command);
         return Ok(response);
     }

 }
Use Event Dispatcher
   public class ValidationBehavior<TRequest, TResponse>: IEventCustomPipeline<TRequest, TResponse>
       where TRequest : IEventRequest<TResponse>
       where TResponse : IEventResponse
   {
       public async Task<TResponse> Handle(
           TRequest request,
           EventHandlerDelegate<TResponse> next,
           CancellationToken cancellationToken)
       {
           Console.WriteLine($"Validating {typeof(TRequest).Name}");
           return await next();
       }
   }

Use Example
 public class ExampleController(IEventDispatcher _eventDispatcher) : ControllerBase
 {
  [HttpPost("update-user")]
  public async Task<IActionResult> UpdateUser([FromBody] UpdateUserCommandRequest command)
  {
      UpdateUserCommandResponse response = await _eventDispatcher.SendAsync(command);
      return Ok(response);
  }

 }
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on EventFlux:

Package Downloads
EventFlux.RabbitFlow

It is a library combined with rabbitmq and ventflux libraries. The library functions as a distributed event handler.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.5 153 3/23/2025
1.1.4 134 3/16/2025
1.1.3 114 3/16/2025
1.1.2 119 3/16/2025
1.1.1 162 3/10/2025
1.1.0 158 3/10/2025

Initial release with event-based CQRS support.