|
| 1 | +# Notify |
| 2 | + |
| 3 | +**Asynchronous, broker-backed notification delivery for .NET** |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## Quickstart |
| 8 | + |
| 9 | +```csharp |
| 10 | +// Producer - publish notifications |
| 11 | +builder.Services |
| 12 | + .AddNotify(builder.Configuration.GetSection("Notify")) |
| 13 | + .UseRabbitMq(); |
| 14 | + |
| 15 | +await notify.SendAsync(new NotificationPackage |
| 16 | +{ |
| 17 | + Channel = NotificationChannel.Email, |
| 18 | + Title = "Welcome!", |
| 19 | + Description = "Thanks for signing up.", |
| 20 | + CustomData = new() { ["recipient"] = "user@example.com" } |
| 21 | +}); |
| 22 | +``` |
| 23 | + |
| 24 | +```csharp |
| 25 | +// Worker - consume and deliver |
| 26 | +builder.Services |
| 27 | + .AddNotify(builder.Configuration.GetSection("Notify")) |
| 28 | + .UseRabbitMq() |
| 29 | + .AddNotifyDispatcher() |
| 30 | + .AddEmailProvider<MyEmailProvider, MyEmailOptions>("Notify:Providers:Email"); |
| 31 | +``` |
| 32 | + |
| 33 | +## Features |
| 34 | + |
| 35 | +- **Broker-Agnostic** - Pluggable message broker support (RabbitMQ included) |
| 36 | +- **Multi-Channel** - Email, SMS, Push with consistent payload structure |
| 37 | +- **Batching & Concurrency** - Tunable throughput controls per channel |
| 38 | +- **Compression** - LZ4/GZip support for large payloads |
| 39 | +- **Serialization** - JSON or MessagePack |
| 40 | +- **Observability** - Metrics via System.Diagnostics.Metrics |
| 41 | + |
| 42 | +## Package Structure |
| 43 | + |
| 44 | +| Package | Description | |
| 45 | +|---------|-------------| |
| 46 | +| `Notify.Abstractions` | Interfaces and core models | |
| 47 | +| `Notify.Core` | Producer-side publishing, serialization | |
| 48 | +| `Notify.Hosting` | Worker-side consumption and dispatching | |
| 49 | +| `Notify.Broker.RabbitMQ` | RabbitMQ broker implementation | |
| 50 | + |
| 51 | +## Documentation |
| 52 | + |
| 53 | +For full documentation, visit [GitHub](https://github.com/atakanatali/notify). |
0 commit comments