MutfakMessageHub 1.0.0

dotnet add package MutfakMessageHub --version 1.0.0
                    
NuGet\Install-Package MutfakMessageHub -Version 1.0.0
                    
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="MutfakMessageHub" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MutfakMessageHub" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="MutfakMessageHub" />
                    
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 MutfakMessageHub --version 1.0.0
                    
#r "nuget: MutfakMessageHub, 1.0.0"
                    
#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.
#:package MutfakMessageHub@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MutfakMessageHub&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=MutfakMessageHub&version=1.0.0
                    
Install as a Cake Tool

<p align="center"> <img src="https://mutfakyazlimevi.com/.../logo.png" width="180" /> </p>

License

NuGet

Build

🔥 Highlights

  • MediatR-compatible API
  • Request/Response messaging
  • Notification broadcasting
  • Parallel & Sequential dispatch
  • Pipeline behaviors (Exception, Validation, Retry, Cache)
  • Outbox pattern
  • Telemetry (OpenTelemetry)
  • Dead-letter queue
  • Timeout support
  • Source generator (handler discovery)
  • High-performance open-generic caching

MutfakMessageHub, .NET uygulamaları için modern, hafif ve genişletilebilir bir in-process messaging kütüphanesidir. MediatR'ın kullanım kolaylığını korurken; pipeline, performans, telemetri ve mesaj güvenilirliğini artıran ek özellikler içerir.

Kütüphane tam olarak aşağıdaki bileşenleri destekler:

  • Request/Response messaging
  • Notification broadcasting (sequential veya parallel dispatch)
  • Pipeline behavior zinciri
  • Exception, Validation, Retry ve Caching behavior'ları
  • Outbox Pattern ile güvenilir mesaj teslimi
  • OpenTelemetry entegrasyonu
  • Source Generator tabanlı handler discovery
  • Timeout ve Dead-Letter mekanizması

Özellikler

✓ Request / Response Modeli

MediatR ile birebir uyumlu API:

public interface IRequest<T> { }
public interface IRequestHandler<TRequest, TResponse> { }

✓ Notification Modeli

Broadcast tarzı event işleme:

public interface INotification { }
public interface INotificationHandler<TNotification> { }

Sequential ya da parallel publish desteklenir.

✓ Pipeline Architecture

Hem request hem notification için pipeline behavior desteği:

  • ExceptionHandlingBehavior
  • ValidationBehavior
  • RetryBehavior
  • CachingBehavior
  • UnitOfWorkBehavior (opsiyonel)
  • TimeoutBehavior
  • Custom behavior desteği

Kurulum

dotnet add package MutfakMessageHub
services.AddMutfakMessageHub(options =>
{
    options.EnableCaching();
    options.EnableRetry();
    options.EnableOutbox();
    options.EnableTelemetry();
    options.EnableDeadLetterQueue();
});

Kullanım

Request / Handler

public class GetUserQuery : IRequest<UserDto>
{
    public int Id { get; set; }
}

public class GetUserHandler : IRequestHandler<GetUserQuery, UserDto>
{
    public Task<UserDto> Handle(GetUserQuery request, CancellationToken token)
    {
        return Task.FromResult(new UserDto { Id = request.Id });
    }
}

Notification / Handler

public class UserCreatedNotification : INotification
{
    public int UserId { get; set; }
}

public class SendWelcomeMailHandler : INotificationHandler<UserCreatedNotification>
{
    public Task Handle(UserCreatedNotification notification, CancellationToken token)
    {
        return Task.CompletedTask;
    }
}

Publish

await mediator.Publish(new UserCreatedNotification { UserId = 15 });

Parallel publish:

await mediator.PublishParallel(new UserCreatedNotification { UserId = 15 });

Pipeline Behavior

Exception Handling

public class ExceptionHandlingBehavior<TRequest, TResponse>
    : IMessagePipelineBehavior<TRequest, TResponse>
{
    public async Task<TResponse> Handle(
        TRequest request,
        CancellationToken token,
        RequestHandlerDelegate<TResponse> next)
    {
        try
        {
            return await next();
        }
        catch (Exception)
        {
            throw;
        }
    }
}

Cache Behavior

[Cache(DurationSeconds = 60)]
public class GetProductsQuery : IRequest<List<Product>> { }

Outbox Pattern

Dağıtık sistemlerde kayıpsız event yayını sağlar.

Telemetry

OpenTelemetry ile Activity ve metrik üretir.

Source Generator

Compile-time handler keşfi ile yüksek performans sağlar.

Timeout Behavior

[RequestTimeout(2000)]
public class SlowQuery : IRequest<string> { }

Dead-Letter Queue

Başarısız notification handler sonuçları DLQ'ya yazılır.

Performans

Open-generic caching, source generator, lazy resolution, minimal reflection kullanır.

Yayınlama

NuGet.org'a yayınlama adımları için Publishing Guide dokümantasyonuna bakın.

Lisans

MIT License

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 449 12/10/2025