MutfakMessageHub 1.0.0
dotnet add package MutfakMessageHub --version 1.0.0
NuGet\Install-Package MutfakMessageHub -Version 1.0.0
<PackageReference Include="MutfakMessageHub" Version="1.0.0" />
<PackageVersion Include="MutfakMessageHub" Version="1.0.0" />
<PackageReference Include="MutfakMessageHub" />
paket add MutfakMessageHub --version 1.0.0
#r "nuget: MutfakMessageHub, 1.0.0"
#:package MutfakMessageHub@1.0.0
#addin nuget:?package=MutfakMessageHub&version=1.0.0
#tool nuget:?package=MutfakMessageHub&version=1.0.0
<p align="center"> <img src="https://mutfakyazlimevi.com/.../logo.png" width="180" /> </p>
🔥 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 | Versions 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. |
-
net10.0
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
-
net6.0
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- System.Diagnostics.DiagnosticSource (>= 8.0.1)
-
net7.0
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- System.Diagnostics.DiagnosticSource (>= 8.0.1)
-
net8.0
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
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 |