{"id":25733651,"url":"https://github.com/mreshboboyev/notifications-channel","last_synced_at":"2026-05-03T22:31:46.217Z","repository":{"id":279427531,"uuid":"938763520","full_name":"MrEshboboyev/notifications-channel","owner":"MrEshboboyev","description":"Notifications.Channel is an asynchronous notification system built with .NET 9, MediatR, and OpenTelemetry. It uses channel-based publishers for efficient, non-blocking event processing, ensuring scalability, observability, and real-time notifications in distributed applications.","archived":false,"fork":false,"pushed_at":"2025-02-25T14:02:41.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T14:41:44.851Z","etag":null,"topics":["asyncronous-messaging","background-processing","channels","cloud-native","docker","event-driven-architecture","event-handling","logging","mediatr","microservices","notifications","observability","open-telemetry","pub-sub","tracing"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrEshboboyev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-25T13:16:27.000Z","updated_at":"2025-02-25T14:05:39.000Z","dependencies_parsed_at":"2025-02-25T14:41:58.550Z","dependency_job_id":"f210885f-8dea-4ee9-9213-7dda5a5d0cc0","html_url":"https://github.com/MrEshboboyev/notifications-channel","commit_stats":null,"previous_names":["mreshboboyev/notifications.channel"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrEshboboyev%2Fnotifications-channel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrEshboboyev%2Fnotifications-channel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrEshboboyev%2Fnotifications-channel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrEshboboyev%2Fnotifications-channel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrEshboboyev","download_url":"https://codeload.github.com/MrEshboboyev/notifications-channel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240790287,"owners_count":19858009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncronous-messaging","background-processing","channels","cloud-native","docker","event-driven-architecture","event-handling","logging","mediatr","microservices","notifications","observability","open-telemetry","pub-sub","tracing"],"created_at":"2025-02-26T04:22:21.278Z","updated_at":"2025-10-10T02:11:51.068Z","avatar_url":"https://github.com/MrEshboboyev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔔 Notifications.Channel – Scalable Asynchronous Notifications in .NET 9 🚀  \n\n![.NET 9](https://img.shields.io/badge/.NET%209-blue?style=for-the-badge)\n![MediatR](https://img.shields.io/badge/MediatR-%E2%9C%85-green?style=for-the-badge)\n![OpenTelemetry](https://img.shields.io/badge/OpenTelemetry-%F0%9F%94%A5-orange?style=for-the-badge)\n![Asynchronous Messaging](https://img.shields.io/badge/Async%20Messaging-%F0%9F%9A%80-purple?style=for-the-badge)\n![Docker](https://img.shields.io/badge/Docker-%F0%9F%90%A6-blue?style=for-the-badge)\n\n## 🎯 Overview  \n\n**Notifications.Channel** is a **high-performance, asynchronous notification system** built with **.NET 9**, **MediatR**, and **OpenTelemetry**. This solution provides **event-driven messaging** using a **custom channel-based publisher**, ensuring **scalability, reliability, and observability** for real-time notifications.  \n\n\u003e **Why Use Notifications.Channel?**  \n\u003e - 🚀 **Asynchronous \u0026 Non-Blocking** – Uses **channels for efficient notification handling**.  \n\u003e - 📡 **Event-Driven Design** – Implements **MediatR for pub/sub messaging**.  \n\u003e - 🔎 **Built-in Observability** – Integrated with **OpenTelemetry** for tracing.  \n\u003e - 🛠 **Docker-Ready \u0026 Scalable** – Deployable in **containerized environments**.  \n\n---\n\n## 🌟 Features  \n\n✅ **.NET 9 Web API** – Built with the latest **ASP.NET Core framework**.  \n✅ **MediatR Integration** – Implements **publish-subscribe (pub/sub) messaging**.  \n✅ **Channel-Based Notifications** – Uses **custom channel publishers** for async handling.  \n✅ **Multiple Notification Handlers** – Supports **parallel processing**.  \n✅ **OpenTelemetry Tracing** – Provides **real-time observability**.  \n✅ **Docker Support** – Easily deploy with **Docker containers**.  \n\n---\n\n## 🏗️ Architecture \u0026 Project Structure  \n\n📌 **src/Notifications.Channel/Program.cs** – Configures **MediatR, OpenTelemetry**, and API setup.  \n📌 **src/Notifications.Channel/ChannelPublisher.cs** – Implements the **custom channel-based publisher**.  \n📌 **src/Notifications.Channel/OrderCreatedNotification.cs** – Defines the **notification event**.  \n📌 **src/Notifications.Channel/NotificationHandlers/** – Contains **async notification handlers**.  \n\n---\n\n## 🚀 Getting Started  \n\n### **📌 Prerequisites**  \n✅ [.NET 9 SDK](https://dotnet.microsoft.com/download/dotnet/9.0)  \n✅ [Docker](https://www.docker.com/) (optional for containerization)  \n\n### **Step 1: Clone the Repository**  \n```bash\ngit clone https://github.com/yourusername/Notifications.Channel.git\ncd Notifications.Channel\n```\n\n### **Step 2: Build \u0026 Run the Application**  \n```bash\ndotnet build\ndotnet run --project src/Notifications.Channel\n```\n\n---\n\n## 🐳 Running with Docker  \n\n### **Step 1: Build Docker Image**  \n```bash\ndocker build -t notifications-channel .\n```\n\n### **Step 2: Run Container**  \n```bash\ndocker run -p 8080:80 notifications-channel\n```\n\n\u003e 🔹 **Docker allows easy deployment** in **cloud environments** or **microservices architectures**.  \n\n---\n\n## 🌍 API Endpoints  \n\n| Method | Endpoint   | Description |\n|--------|-----------|-------------|\n| **POST**  | `/orders`  | Creates a new order \u0026 triggers **OrderCreatedNotification** |\n\n### **Example Request (cURL)**\n```bash\ncurl -X POST http://localhost:8080/orders\n```\n\n\u003e 📢 **When a new order is created**, the API **publishes an event** that triggers **multiple handlers** asynchronously.  \n\n---\n\n## 🔎 OpenTelemetry Integration  \n\nThis project is **pre-configured with OpenTelemetry** for **end-to-end tracing**, providing **real-time monitoring** of notifications.  \n\n🔹 **Features**:  \n✅ **ASP.NET Core Instrumentation** – Captures **request-response tracing**.  \n✅ **OTLP Exporter** – Sends telemetry data to **external observability platforms**.  \n✅ **Real-Time Monitoring** – View **end-to-end tracing** of notifications.  \n\n---\n\n## 📨 MediatR \u0026 Asynchronous Notifications  \n\n### **How Notifications Work**  \n\n1️⃣ **Client sends a POST request to `/orders`**.  \n2️⃣ **MediatR publishes an `OrderCreatedNotification` event**.  \n3️⃣ **ChannelPublisher asynchronously processes notifications**.  \n4️⃣ **Multiple handlers consume the notification in parallel**.  \n\n### **Notification Handlers**  \n\n🔹 **OrderCreatedHandler** – Logs **order creation event**.  \n🔹 **SlowOrderCreatedHandler** – Simulates a **delayed event handler**.  \n🔹 **VerySlowOrderCreatedHandler** – Simulates a **long-running task**.  \n\n\u003e ⚡ **Handlers process events independently** without blocking the main request.  \n\n---\n\n## 🧪 Testing  \n\n### **Unit Tests**  \nRun tests to verify **notification handling and performance**:  \n```bash\ndotnet test\n```\n\n### **Manual API Testing**  \n📌 **Use Postman or Swagger UI** to:  \n✅ **Create an order** → `/orders`  \n✅ **Check OpenTelemetry traces**  \n✅ **Verify async notification handling**  \n\n---\n\n## 🎯 Why Use This Project?  \n\n✅ **High-Performance Asynchronous Notifications** – Reduces **blocking operations**.  \n✅ **Scalable \u0026 Fault-Tolerant** – Uses **channels \u0026 MediatR** for parallel execution.  \n✅ **Full Observability with OpenTelemetry** – Provides **tracing \u0026 monitoring**.  \n✅ **Production-Ready \u0026 Docker-Deployable** – Easily **scales in microservices**.  \n\n---\n\n## 📜 License  \n\nThis project is licensed under the **MIT License**. See [LICENSE](LICENSE) for details.  \n\n---\n\n## 📞 Contact  \n\nFor feedback, contributions, or questions:  \n📧 **Email**: mreshboboyev@gmail.com  \n💻 **GitHub**: [MrEshboboyev](https://github.com/MrEshboboyev)  \n\n---\n\n🚀 **Build scalable, event-driven APIs with Notifications.Channel!** Clone the repo \u0026 start now!  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmreshboboyev%2Fnotifications-channel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmreshboboyev%2Fnotifications-channel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmreshboboyev%2Fnotifications-channel/lists"}