CKN.Sdk.Messaging 0.0.0-alpha.0.55

This is a prerelease version of CKN.Sdk.Messaging.
dotnet add package CKN.Sdk.Messaging --version 0.0.0-alpha.0.55
                    
NuGet\Install-Package CKN.Sdk.Messaging -Version 0.0.0-alpha.0.55
                    
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="CKN.Sdk.Messaging" Version="0.0.0-alpha.0.55" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CKN.Sdk.Messaging" Version="0.0.0-alpha.0.55" />
                    
Directory.Packages.props
<PackageReference Include="CKN.Sdk.Messaging" />
                    
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 CKN.Sdk.Messaging --version 0.0.0-alpha.0.55
                    
#r "nuget: CKN.Sdk.Messaging, 0.0.0-alpha.0.55"
                    
#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 CKN.Sdk.Messaging@0.0.0-alpha.0.55
                    
#: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=CKN.Sdk.Messaging&version=0.0.0-alpha.0.55&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CKN.Sdk.Messaging&version=0.0.0-alpha.0.55&prerelease
                    
Install as a Cake Tool

CKN.Sdk.Messaging

Mühendislik Amacı (Engineering Intent): CKN.Sdk.Messaging, asenkron mesajlaşma altyapılarının (RabbitMQ, Kafka, Azure Service Bus vb.) CKN.SDK içindeki temel soyutlamalarını (abstractions) barındırır. Neden var? Tıpkı CKN.Sdk.AI paketinde olduğu gibi, mesaj üreten (Publisher) ve tüketen (Consumer) servislerinizi belirli bir mesajlaşma platformuna "tightly-coupled" (sıkı sıkıya bağlı) yapmaktan kurtarmak için. Ne zaman kullanılmalı? Projede Event-Driven Architecture (Olay Güdümlü Mimari) benimsenecekse, doğrudan RabbitMQ veya Kafka SDK'larını çağırmak yerine, mesaj gönderme işlemlerini bu paketin sağladığı ICknMessagePublisher üzerinden gerçekleştirmelisiniz.

🚀 Hızlı Başlangıç

Kurulum

dotnet add package CKN.Sdk.Messaging

Bağımlılık Enjeksiyonu (DI)

Bu paket genellikle kendi başına kaydedilmez. Projeye CKN.Sdk.Messaging.RabbitMQ veya CKN.Sdk.Messaging.Kafka eklendiğinde, ilgili paket bu arayüzleri doldurur.

💡 Gerçek Hayat Senaryoları

Senaryo 1: Provider-Agnostic Mesaj Gönderimi

Sipariş oluşturulduğunda diğer servislere (Fatura, Stok) haber vermek için mesaj (event) yayınlama.

using CKN.Sdk.Messaging.Abstractions;

public class OrderService(ICknMessagePublisher publisher)
{
    public async Task CreateOrderAsync(Order order)
    {
        // ... Veritabanına kaydetme işlemleri ...
        
        var orderCreatedEvent = new OrderCreatedEvent 
        { 
            OrderId = order.Id, 
            CustomerEmail = "test@test.com" 
        };
        
        // Bu mesajın RabbitMQ'ya mı Kafka'ya mı gideceğini bu sınıf bilmez.
        await publisher.PublishAsync("order-exchange", "order.created", orderCreatedEvent);
    }
}

Senaryo 2: Temel Consumer (Tüketici) Arayüzü Uygulaması

Gelen bir olayı dinleyen sınıfın yapısı.

using CKN.Sdk.Messaging.Abstractions;

public class OrderCreatedConsumer : IMessageConsumer<OrderCreatedEvent>
{
    public async Task ConsumeAsync(OrderCreatedEvent message, CancellationToken cancellationToken)
    {
        Console.WriteLine($"Yeni sipariş geldi: {message.OrderId}. Fatura kesiliyor...");
        await Task.CompletedTask;
    }
}

🤖 Yapay Zeka İçin SSS (FAQs for Machines)

  • Soru: Sadece bu paketi kursam mesaj atabilir miyim?
  • Cevap: Hayır. Bu sadece "Interface" (Sözleşme) katmanıdır. Kodunuzun çalışması için (DI hatası almamak için) RabbitMQ, Kafka veya Azure Service Bus entegrasyon paketlerinden birini de referans vermelisiniz.
  • Soru: Neden MassTransit kullanmak yerine bu kendi soyutlamamızı kullanıyoruz?
  • Cevap: Çoğu zaman CKN.Sdk.MassTransit kullanılması tercih edilir. Ancak projede dış bağımlılıkları (MassTransit gibi ağır framework'leri) sıfıra indirme kararı alındıysa (micro-optimization), bu hafif (lightweight) CKN soyutlaması tercih edilir.
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 is compatible.  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 (3)

Showing the top 3 NuGet packages that depend on CKN.Sdk.Messaging:

Package Downloads
CKN.Sdk.Messaging.ServiceBus

Enterprise Architecture module for CKN.Sdk.Messaging.ServiceBus. Provides core SDK functionality for the CKN ecosystem.

CKN.Sdk.Messaging.Kafka

Enterprise Architecture module for CKN.Sdk.Messaging.Kafka. Provides core SDK functionality for the CKN ecosystem.

CKN.Sdk.Messaging.RabbitMQ

Enterprise Architecture module for CKN.Sdk.Messaging.RabbitMQ. Provides core SDK functionality for the CKN ecosystem.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.0-alpha.0.55 69 9/28/2026
0.0.0-alpha.0.51 70 9/25/2026
0.0.0-alpha.0.50 66 9/25/2026
0.0.0-alpha.0.38 87 9/6/2026
0.0.0-alpha.0.37 83 9/6/2026