<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tayfun Yalcinkaya</title>
    <description>The latest articles on DEV Community by Tayfun Yalcinkaya (@tayfun_yalcinkaya_9c29444).</description>
    <link>https://dev.to/tayfun_yalcinkaya_9c29444</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3694915%2Fc4d15de0-9161-4405-8258-c08c54ad7398.jpg</url>
      <title>DEV Community: Tayfun Yalcinkaya</title>
      <link>https://dev.to/tayfun_yalcinkaya_9c29444</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tayfun_yalcinkaya_9c29444"/>
    <language>en</language>
    <item>
      <title>Bölüm 2: Event Pipeline Tasarımı: Kafka’dan Lakehouse’a Gerçek Zamanlı Veri Yaşam Döngüsü</title>
      <dc:creator>Tayfun Yalcinkaya</dc:creator>
      <pubDate>Thu, 04 Jun 2026 18:35:50 +0000</pubDate>
      <link>https://dev.to/tayfun_yalcinkaya_9c29444/bolum-2-event-pipeline-tasarimi-kafkadan-lakehousea-gercek-zamanli-veri-yasam-dongusu-3cbf</link>
      <guid>https://dev.to/tayfun_yalcinkaya_9c29444/bolum-2-event-pipeline-tasarimi-kafkadan-lakehousea-gercek-zamanli-veri-yasam-dongusu-3cbf</guid>
      <description>&lt;p&gt;İlk yazıda Event Driven Architecture’ın temel kavramlarını, Kafka üzerinde topic/channel tasarımını, event-command ayrımını, schema contract’ları ve producer-consumer ilişkisini ele aldık. Bu yazıda odağı bir adım ileri taşıyıp event’in platform içindeki yaşam döngüsüne bakacağız.&lt;/p&gt;

&lt;p&gt;Çünkü EDA tasarımında asıl zorluk yalnızca event üretmek değildir. Asıl mesele, üretilen event’in güvenilir, izlenebilir, tekrar işlenebilir, zenginleştirilebilir ve farklı tüketiciler tarafından kullanılabilir hale gelmesidir.&lt;/p&gt;

&lt;p&gt;Bu yazıda şu sorulara odaklanacağız:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ham event platforma geldiğinde ne olur?&lt;/li&gt;
&lt;li&gt;Event nasıl doğrulanır, zenginleştirilir ve tüketilebilir hale gelir?&lt;/li&gt;
&lt;li&gt;Raw, validated, enriched ve curated topic’ler nasıl konumlandırılmalıdır?&lt;/li&gt;
&lt;li&gt;Bu yapı modern lakehouse mimarilerindeki Medallion yaklaşımıyla nasıl ilişkilendirilebilir?&lt;/li&gt;
&lt;li&gt;DLQ ve alert topic’leri ne zaman devreye girer?&lt;/li&gt;
&lt;li&gt;Replay, idempotency, monitoring, security ve governance nasıl düşünülmelidir?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Event Pipeline Nedir?
&lt;/h2&gt;

&lt;p&gt;EDA mimarilerinde özellikle data platform projelerinde event’ler genellikle bir yaşam döngüsünden geçer.&lt;/p&gt;

&lt;p&gt;Bu yaşam döngüsü şöyle modellenebilir:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw -&amp;gt; validated -&amp;gt; enriched -&amp;gt; curated
                  |             |
                  v             v
                 dlq          alert
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu yapı, veri akışının aşama aşama olgunlaşmasını sağlar.&lt;/p&gt;

&lt;p&gt;Raw topic kaynaktan gelen ham event’i taşır. Validated topic schema ve temel kalite kontrollerinden geçmiş event’leri içerir. Enriched topic event’in referans veriler veya başka veri kaynaklarıyla zenginleştirilmiş halidir. Curated topic ise tüketiciler için güvenilir, normalize edilmiş ve iş anlamı netleşmiş event’leri temsil eder.&lt;/p&gt;

&lt;h2&gt;
  
  
  Event Pipeline ve Medallion Architecture İlişkisi
&lt;/h2&gt;

&lt;p&gt;Bu yapı, modern lakehouse mimarilerinde sık kullanılan Medallion yaklaşımıyla doğal bir benzerlik taşır.&lt;/p&gt;

&lt;p&gt;Lakehouse tarafında Bronze katmanı ham veriyi, Silver katmanı temizlenmiş ve zenginleştirilmiş veriyi, Gold katmanı ise iş tüketimine hazır veri ürünlerini temsil eder. Kafka üzerindeki raw, validated, enriched ve curated topic’leri de benzer bir olgunlaşma mantığını akan veri üzerinde uygular.&lt;/p&gt;

&lt;p&gt;Ancak burada önemli bir ayrım vardır: Kafka tarafında bu aşamalar event channel olarak çalışır; lakehouse tarafında ise kalıcı, sorgulanabilir ve yönetişime tabi veri setlerine dönüşür.&lt;/p&gt;

&lt;p&gt;Bunu şöyle düşünebiliriz:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Kafka raw topic       -&amp;gt; Lakehouse bronze table
Kafka enriched topic  -&amp;gt; Lakehouse silver table
Kafka curated topic   -&amp;gt; Lakehouse gold table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu birebir ve zorunlu bir eşleştirme değildir. Her topic’in lakehouse üzerinde ayrı bir tabloya dönüşmesi gerekmez. Ama mimari düşünce olarak iki taraf da verinin ham halden güvenilir ve tüketilebilir hale gelmesini hedefler.&lt;/p&gt;

&lt;p&gt;Daha doğru ayrım şu şekildedir:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Data in motion: Kafka topics
Data at rest: Lakehouse tables
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kafka gerçek zamanlı akış, tüketici bağımsızlığı, fan-out, düşük gecikme ve replay kabiliyeti sağlar. Lakehouse ise kalıcı saklama, tarihsel analiz, SQL erişimi, BI/ML tüketimi, veri yönetişimi ve analitik veri ürünleri için konumlanır.&lt;/p&gt;

&lt;h2&gt;
  
  
  Raw Topic
&lt;/h2&gt;

&lt;p&gt;Raw topic, kaynaktan gelen ham event’in yazıldığı ilk kanaldır.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw.payment.transaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu aşamada veri kaynaktan geldiği şekliyle saklanır. Format bozuk olabilir, eksik alanlar olabilir, beklenen schema ile tam uyumlu olmayabilir. Raw katmanı özellikle replay, audit ve troubleshooting için değerlidir.&lt;/p&gt;

&lt;p&gt;Raw topic, lakehouse tarafında bronze katmana yazılacak event’lerin de kaynağı olabilir. Bu sayede streaming tarafındaki event akışı ile analitik taraftaki ham veri arşivi arasında bağ kurulmuş olur.&lt;/p&gt;

&lt;h2&gt;
  
  
  Validated Topic
&lt;/h2&gt;

&lt;p&gt;Validated topic, schema ve temel veri kalite kontrollerinden geçmiş event’leri içerir.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;validated.payment.transaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu aşamada tipik kontroller şunlardır:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zorunlu alanlar var mı?&lt;/li&gt;
&lt;li&gt;Event schema’ya uygun mu?&lt;/li&gt;
&lt;li&gt;Tarih, sayı ve para birimi formatları doğru mu?&lt;/li&gt;
&lt;li&gt;Event ID var mı?&lt;/li&gt;
&lt;li&gt;Event zamanı geçerli mi?&lt;/li&gt;
&lt;li&gt;Duplicate kontrolü gerekiyor mu?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Raw topic’i tüketen bir validation-service, başarılı event’leri validated topic’e, hatalı event’leri ise DLQ topic’e yazabilir.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw.payment.transaction
        |
        v
validation-service
        |
        +--&amp;gt; validated.payment.transaction
        +--&amp;gt; dlq.payment.transaction.validation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Validated topic, downstream işlemlerin ham ve güvenilmez veriyle doğrudan çalışmasını engeller.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enriched Topic
&lt;/h2&gt;

&lt;p&gt;Enriched topic, doğrulanmış event’in ek bilgilerle zenginleştirilmiş halidir.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enriched.payment.transaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Örneğin raw event içinde sadece müşteri ID ve işlem bilgisi olabilir:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"transaction_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"T1001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"customer_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C789"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"merchant_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"M456"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;950&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"currency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"TRY"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enrichment sonrası event’e müşteri segmenti, merchant category, ülke, risk skoru veya lokasyon bilgisi eklenebilir:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"transaction_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"T1001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"customer_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C789"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"customer_segment"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"premium"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"merchant_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"M456"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"merchant_category"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"electronics"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"country"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"TR"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;950&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"currency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"TRY"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"risk_score"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu aşamada consumer artık sadece veri taşımaz; başka kaynaklarla join, lookup veya referans veri eşleştirmesi yapar.&lt;/p&gt;

&lt;p&gt;Lakehouse perspektifinden enriched event’ler çoğu zaman silver katman için anlamlı bir girdidir. Çünkü veri artık ham halinden çıkmış, belirli kalite kontrollerinden geçmiş ve analitik açıdan daha kullanılabilir hale gelmiştir.&lt;/p&gt;

&lt;h2&gt;
  
  
  Curated Topic
&lt;/h2&gt;

&lt;p&gt;Curated topic, tüketiciler için güvenilir, normalize edilmiş ve iş anlamı netleşmiş event’leri içerir.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curated.payment.transaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Curated katman, çoğu downstream tüketicinin bağlanmasını isteyeceğimiz seviyedir. BI, dashboard, data lake ingestion, machine learning feature pipeline, notification ve operational analytics gibi tüketiciler çoğunlukla curated event’leri kullanmalıdır.&lt;/p&gt;

&lt;p&gt;Lakehouse tarafında curated event’ler gold katmandaki veri ürünlerine kaynak olabilir. Örneğin operasyonel dashboard, müşteri segment analizi, fraud KPI’ları veya ödeme başarı oranı gibi metrikler curated event’lerden üretilebilir.&lt;/p&gt;

&lt;h2&gt;
  
  
  Alert Topic
&lt;/h2&gt;

&lt;p&gt;Alert topic, alarm, fraud, threshold breach veya anomali gibi aksiyon gerektiren event’lerin yayınlandığı kanaldır.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alert.payment.fraud
alert.machine.temperature
alert.network.anomaly
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alert topic her zaman lineer pipeline’ın son adımı olmak zorunda değildir. Bazen validated, bazen enriched, bazen de curated topic’ten beslenen ayrı bir stream processing job tarafından üretilebilir.&lt;/p&gt;

&lt;p&gt;Örneğin:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enriched.payment.transaction
        |
        v
fraud-detection-service
        |
        +--&amp;gt; alert.payment.fraud
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alert topic’leri operational reaction için tasarlanır. Bu nedenle retention, consumer SLA, retry ve notification entegrasyonları ayrıca düşünülmelidir.&lt;/p&gt;

&lt;h2&gt;
  
  
  DLQ Topic
&lt;/h2&gt;

&lt;p&gt;DLQ, yani Dead Letter Queue, işlenemeyen veya hatalı event’lerin gönderildiği kanaldır.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dlq.payment.transaction.validation
dlq.payment.transaction.enrichment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;DLQ sadece hatalı payload’ı değil, hata nedenini de taşımalıdır.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"original_topic"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"raw.payment.transaction"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"original_partition"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"original_offset"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;982133&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"error_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"VALIDATION_ERROR"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"error_message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"customer_id is missing"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"failed_at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-05-13T12:30:00Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"payload"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"transaction_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"T1001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;950&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu yaklaşım, sorunlu kayıtların kaybolmasını engeller ve sonradan düzeltme, inceleme veya replay yapılmasına imkan sağlar.&lt;/p&gt;

&lt;p&gt;DLQ tasarlanmayan EDA projelerinde hatalı event’ler ya sessizce kaybolur ya da consumer tarafında sürekli retry edilerek pipeline’ın tamamını yavaşlatır.&lt;/p&gt;

&lt;h2&gt;
  
  
  Her Aşama Ayrı Topic Olmak Zorunda mı?
&lt;/h2&gt;

&lt;p&gt;Hayır. Raw, validated, enriched ve curated aşamalarının her biri fiziksel Kafka topic olmak zorunda değildir.&lt;/p&gt;

&lt;p&gt;Üç temel yaklaşım vardır.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Stage-Based Pipeline
&lt;/h3&gt;

&lt;p&gt;Her aşama ayrı bir topic olarak modellenir.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw -&amp;gt; validated -&amp;gt; enriched -&amp;gt; curated
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu model izlenebilirlik, replay, audit ve ekipler arası sorumluluk ayrımı için güçlüdür. Ancak topic sayısını ve operasyonel karmaşıklığı artırır.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Single Processor, Multi-Output
&lt;/h3&gt;

&lt;p&gt;Tek bir stream processing job raw topic’i okur, validasyon, enrichment ve curation işlemlerini yapar, sadece sonuç topic’lerine yazar.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw.payment.transaction
        |
        v
stream-processing-job
        |
        +--&amp;gt; curated.payment.transaction
        +--&amp;gt; alert.payment.fraud
        +--&amp;gt; dlq.payment.transaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu model daha az topic ve daha düşük latency sağlar. Ancak ara aşamalar görünmediği için debug ve replay daha zor olabilir.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Branching Pipeline
&lt;/h3&gt;

&lt;p&gt;Aynı topic’ten birden fazla consumer farklı amaçlarla beslenir.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;validated.payment.transaction
        |
        +--&amp;gt; enrichment-service
        +--&amp;gt; audit-sink-service
        +--&amp;gt; fraud-service
        +--&amp;gt; realtime-dashboard-service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;EDA’nın en güçlü taraflarından biri de budur: Aynı event, birden fazla bağımsız consumer tarafından farklı amaçlarla kullanılabilir.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kafka ve Lakehouse Birlikte Nasıl Konumlanır?
&lt;/h2&gt;

&lt;p&gt;İyi tasarlanmış bir EDA mimarisinde Kafka ve lakehouse birbirinin alternatifi değil, tamamlayıcısıdır.&lt;/p&gt;

&lt;p&gt;Kafka şu amaçlarla kullanılır:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Event taşıma.&lt;/li&gt;
&lt;li&gt;Low-latency processing.&lt;/li&gt;
&lt;li&gt;Consumer fan-out.&lt;/li&gt;
&lt;li&gt;Operational reaction.&lt;/li&gt;
&lt;li&gt;Replay.&lt;/li&gt;
&lt;li&gt;Sistemler arası gevşek bağlılık.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lakehouse ise şu amaçlarla kullanılır:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kalıcı saklama.&lt;/li&gt;
&lt;li&gt;Tarihsel analiz.&lt;/li&gt;
&lt;li&gt;SQL analytics.&lt;/li&gt;
&lt;li&gt;BI ve dashboard.&lt;/li&gt;
&lt;li&gt;Machine learning feature üretimi.&lt;/li&gt;
&lt;li&gt;Governance, lineage ve veri ürünleri.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Örnek bir akış şöyle olabilir:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw.payment.transaction
        |
        +--&amp;gt; bronze.payment_transaction_raw
        |
        v
validation-service
        |
        +--&amp;gt; validated.payment.transaction
        +--&amp;gt; dlq.payment.transaction
        |
        v
enrichment-service
        |
        +--&amp;gt; enriched.payment.transaction
        +--&amp;gt; silver.payment_transaction_enriched
        |
        v
curation-service
        |
        +--&amp;gt; curated.payment.transaction
        +--&amp;gt; gold.payment_transaction_analytics
        +--&amp;gt; alert.payment.fraud
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu modelde Kafka data-in-motion tarafını, lakehouse ise data-at-rest tarafını yönetir.&lt;/p&gt;

&lt;h2&gt;
  
  
  Aynı Senaryonun Pipeline Yolculuğu: Streaming’den Arşiv ve Analitiğe
&lt;/h2&gt;

&lt;p&gt;İlk yazıda enerji dağıtım alanındaki anonimleştirilmiş saha örneğini channel-based topic tasarımı açısından ele almıştık. Aynı senaryoya bu kez event pipeline perspektifinden bakalım.&lt;/p&gt;

&lt;p&gt;Bu mimaride farklı kaynaklardan gelen XML tabanlı sayaç ve aktivite mesajları önce güvenli bir Kafka giriş katmanında karşılandı. Güvenlik ve operasyonel izolasyon ihtiyacı nedeniyle dış kaynaklardan gelen verinin doğrudan iç platforma alınması yerine, kontrollü bir ingress yaklaşımı tercih edildi. Bu tip yapılarda dış dünyaya açık veya yarı-açık veri kabul katmanı ile kurum içi event backbone’un ayrılması, hem güvenlik hem de operasyonel yönetilebilirlik açısından önemli bir avantaj sağlar.&lt;/p&gt;

&lt;p&gt;Akışın sonraki adımında stream processing katmanı Kafka’dan gelen mesajları okudu, XML içerikleri parse etti, anlamlandırdı ve hedef sistemlere yönlendirdi. Operasyonel süreçler için veriler ilişkisel bir veritabanına aktarılırken, ham ve tarihsel analiz ihtiyacı için ayrı bir büyük veri/arşivleme katmanı beslendi. Bu sayede aynı event akışı hem günlük operasyonel ihtiyaçlara hem de geriye dönük sorgulama ve analitik senaryolara hizmet edebildi.&lt;/p&gt;

&lt;p&gt;Bu yapı EDA ve lakehouse ilişkisinin sahadaki karşılığına iyi bir örnektir. Kafka tarafında akan event’ler gerçek zamanlı taşıma, ayrıştırma ve tüketici bağımsızlığı sağlarken; arşiv ve analitik katman tarafında ham verinin saklanması, geçmişe dönük sorgulanması, anomali tespiti ve tahminleme gibi senaryolar desteklendi. Modern lakehouse terminolojisiyle düşünürsek, ham sayaç mesajları bronze benzeri bir arşiv katmanına, parse edilmiş ve anlamlandırılmış veriler silver benzeri bir analitik katmana, operasyonel dashboard ve raporlama çıktıları ise gold benzeri tüketim katmanlarına karşılık gelir.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Kafka raw meter topics
        |
        +--&amp;gt; Ham arşiv / bronze benzeri katman
        |
        v
stream processing / parsing / enrichment
        |
        +--&amp;gt; Operasyonel veritabanı
        +--&amp;gt; Arama ve geriye dönük sorgulama katmanı
        +--&amp;gt; Analitik ve tahminleme katmanı
        +--&amp;gt; Dashboard ve alert mekanizmaları
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu senaryoda Kafka retention süresi de mimarinin kritik parçalarından biriydi. Hedef sistemlerden biri yavaşladığında, kısa süreli erişilemez olduğunda veya bakım çalışması yapıldığında veri kaybı yaşanmaması için Kafka kontrollü bir dayanıklılık katmanı gibi çalıştı. Consumer’lar sistem tekrar sağlıklı hale geldiğinde kaldıkları offset’ten okumaya devam ederek akışı yeniden yakalayabildi. Bu, EDA’da retention ve replay tasarımının neden yalnızca teknik bir ayar değil, iş sürekliliği kararı olduğunu gösterir.&lt;/p&gt;

&lt;p&gt;Operasyonel görünürlük de en az veri taşıma kadar önemliydi. Dağıtım şirketi ve veri tipi bazında son saniyelerde ve son saatlerde kaç mesaj geldiğinin izlenmesi, beklenen frekansta veri akışı olup olmadığının takip edilmesi ve akış kesintilerinde alert üretilmesi, platformun yalnızca çalışan değil, gözlemlenebilir bir sistem haline gelmesini sağladı.&lt;/p&gt;

&lt;p&gt;Bu örnekteki temel çıkarım şudur: EDA, yalnızca sistemlerin Kafka’ya event yazması değildir. Güvenli veri kabul katmanı, topic tasarımı, stream processing, retention, replay, operasyonel monitoring, arşivleme ve analitik katman birlikte tasarlandığında gerçek anlamda kurumsal bir veri akışı mimarisi ortaya çıkar.&lt;/p&gt;

&lt;p&gt;Böyle bir akışta parse edilemeyen XML mesajları, eksik sayaç bilgileri, beklenmeyen format değişiklikleri veya hedef sistem yazım hataları ana pipeline’ı durdurmamalıdır. Bu nedenle DLQ veya quarantine benzeri hata akışları, bu tip büyük ölçekli mimarilerde sonradan eklenen bir iyileştirme değil, tasarımın doğal bir parçası olarak düşünülmelidir.&lt;/p&gt;

&lt;h2&gt;
  
  
  Consumer Idempotency Neden Önemlidir?
&lt;/h2&gt;

&lt;p&gt;Kafka tabanlı sistemlerde consumer’ların aynı event’i birden fazla kez işleyebilme ihtimali her zaman düşünülmelidir. Network hatası, retry, offset commit problemi veya uygulama restart durumlarında duplicate processing yaşanabilir.&lt;/p&gt;

&lt;p&gt;Bu nedenle consumer tarafında idempotent tasarım yapılmalıdır.&lt;/p&gt;

&lt;p&gt;Yani aynı event iki kez işlense bile sonuç değişmemelidir.&lt;/p&gt;

&lt;p&gt;Örneğin ödeme event’i iki kez geldiyse müşteriye iki kez para iadesi yapılmamalıdır. Bunun için event_id, transaction_id veya business key üzerinden duplicate kontrolü yapılmalıdır.&lt;/p&gt;

&lt;p&gt;Idempotency özellikle şu tüketicilerde kritiktir:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Finansal işlem yapan consumer’lar.&lt;/li&gt;
&lt;li&gt;Bildirim gönderen servisler.&lt;/li&gt;
&lt;li&gt;Operasyonel database’e yazan sink’ler.&lt;/li&gt;
&lt;li&gt;Alert üreten sistemler.&lt;/li&gt;
&lt;li&gt;Lakehouse tablolarına upsert veya merge yapan job’lar.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Replay Tasarımı
&lt;/h2&gt;

&lt;p&gt;EDA’nın güçlü yanlarından biri, event’lerin belirli bir süre Kafka’da tutulması ve gerektiğinde tekrar okunabilmesidir.&lt;/p&gt;

&lt;p&gt;Replay şu durumlarda gerekebilir:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Yeni bir consumer geçmiş event’leri baştan işlemek ister.&lt;/li&gt;
&lt;li&gt;Hatalı bir enrichment logic’i düzeltilir ve event’ler yeniden işlenir.&lt;/li&gt;
&lt;li&gt;Data lake’e eksik yazılan event’ler tekrar yüklenir.&lt;/li&gt;
&lt;li&gt;Machine learning feature pipeline yeniden oluşturulur.&lt;/li&gt;
&lt;li&gt;DLQ’deki kayıtlar düzeltildikten sonra tekrar akışa alınır.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ancak replay güçlü olduğu kadar risklidir. Replay yapılırken downstream sistemlerin duplicate kayıt üretmemesi, finansal işlem gibi geri döndürülemez aksiyonların tekrar tetiklenmemesi gerekir.&lt;/p&gt;

&lt;p&gt;Replay tasarımı için şu konular baştan düşünülmelidir:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kafka retention süresi yeterli mi?&lt;/li&gt;
&lt;li&gt;Raw event’ler lakehouse bronze katmanda arşivleniyor mu?&lt;/li&gt;
&lt;li&gt;Consumer idempotent mi?&lt;/li&gt;
&lt;li&gt;Replay ayrı consumer group ile mi yapılacak?&lt;/li&gt;
&lt;li&gt;Replay edilen event’ler operasyonel aksiyonları tekrar tetikler mi?&lt;/li&gt;
&lt;li&gt;Hangi topic’ler replay için güvenli kabul ediliyor?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Monitoring ve Operasyon
&lt;/h2&gt;

&lt;p&gt;EDA projelerinde operasyonel görünürlük tasarımın bir parçası olmalıdır.&lt;/p&gt;

&lt;p&gt;Takip edilmesi gereken temel metrikler:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Topic throughput.&lt;/li&gt;
&lt;li&gt;Producer error rate.&lt;/li&gt;
&lt;li&gt;Consumer lag.&lt;/li&gt;
&lt;li&gt;Consumer processing time.&lt;/li&gt;
&lt;li&gt;Failed event count.&lt;/li&gt;
&lt;li&gt;DLQ event count.&lt;/li&gt;
&lt;li&gt;Partition skew.&lt;/li&gt;
&lt;li&gt;Broker disk kullanımı.&lt;/li&gt;
&lt;li&gt;Replication durumu.&lt;/li&gt;
&lt;li&gt;End-to-end latency.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sadece Kafka cluster’ın ayakta olması yeterli değildir. Event’in kaynaktan çıkıp hedef tüketiciye kadar ne kadar sürede ulaştığı ve hangi aşamada beklediği izlenebilmelidir.&lt;/p&gt;

&lt;p&gt;Bu görünürlüğü sağlayabilmek için monitoring tasarımı yalnızca altyapı metriklerine bırakılmamalıdır. Event’in kendisi de izlenebilir olmalıdır. Bunun için event payload veya event metadata içinde standart bazı alanların taşınması gerekir.&lt;/p&gt;

&lt;p&gt;Özellikle şu alanlar event’in platform içindeki yolculuğunu takip etmek için kritik hale gelir:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;event_id          -&amp;gt; Event’in benzersiz kimliği
event_type        -&amp;gt; Event tipi
event_time        -&amp;gt; Kaynak sistemde event’in oluştuğu zaman
source_system     -&amp;gt; Event’i üreten kaynak sistem
correlation_id    -&amp;gt; Aynı iş akışına ait event’leri ilişkilendiren kimlik
schema_version    -&amp;gt; Event schema versiyonu
processing_stage  -&amp;gt; Event’in pipeline içindeki aşaması
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu alanlar sayesinde bir event’in yalnızca Kafka topic’e yazılıp yazılmadığı değil, platform içinde hangi aşamalardan geçtiği de takip edilebilir.&lt;/p&gt;

&lt;p&gt;Örneğin bir event için farklı zaman bilgileri tutulabilir:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;event_time                -&amp;gt; Kaynak sistemde event’in oluştuğu zaman
ingestion_time            -&amp;gt; Kafka’ya ilk yazıldığı zaman
validation_time           -&amp;gt; Validation aşamasından geçtiği zaman
enrichment_time           -&amp;gt; Enrichment aşamasından geçtiği zaman
curation_time             -&amp;gt; Curated topic’e yazıldığı zaman
downstream_delivery_time  -&amp;gt; Hedef sisteme ulaştığı zaman
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu yaklaşım sayesinde end-to-end latency daha doğru ölçülebilir. Gecikmenin kaynak sistemde mi, Kafka topic’inde mi, stream processing job’ında mı, downstream sink’te mi yoksa lakehouse yazım katmanında mı oluştuğu daha net analiz edilebilir.&lt;/p&gt;

&lt;p&gt;Pratikte monitoring tasarımı üç seviyede ele alınmalıdır:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Platform seviyesi
   Broker sağlığı
   Disk kullanımı
   Replication durumu
   Partition dağılımı

2. Akış seviyesi
   Topic throughput
   Consumer lag
   Failed event count
   DLQ count

3. Event lifecycle seviyesi
   End-to-end latency
   Stage latency
   Correlation ID bazlı izleme
   Event freshness
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu seviyedeki görünürlüğü tamamen manuel script’ler, ayrı ayrı dashboard’lar veya dağınık alarm kurallarıyla yönetmek zamanla zorlaşabilir. Özellikle enterprise ortamlarda Kafka operasyonunu destekleyen gelişmiş monitoring, observability, alerting ve governance yeteneklerine sahip platformlardan yararlanmak bu yükü azaltır.&lt;/p&gt;

&lt;p&gt;Örneğin Cloudera Kafka, Confluent Platform veya benzer enterprise Kafka dağıtımları; topic seviyesinde izleme, consumer lag takibi, cluster sağlık kontrolleri, kapasite planlama, güvenlik entegrasyonu, audit ve operasyonel alarm yönetimi gibi konularda daha merkezi bir yönetim yaklaşımı sağlayabilir.&lt;/p&gt;

&lt;p&gt;Buradaki amaç yalnızca metrik toplamak değil, Kafka tabanlı event akışlarını operasyonel olarak yönetilebilir hale getirmektir. Çünkü EDA mimarisinde monitoring, dashboard üzerinde birkaç grafik görmekten ibaret değildir; veri akışının sağlıklı, güvenli, izlenebilir ve SLA’lara uygun ilerlediğini sürekli doğrulama mekanizmasıdır.&lt;/p&gt;

&lt;p&gt;Ayrıca her kritik pipeline için alarm eşikleri baştan tanımlanmalıdır. Örneğin belirli bir kaynaktan beklenen sürede veri gelmiyorsa, consumer lag belirli bir eşiği aşıyorsa, DLQ sayısı normal davranışın üzerine çıkıyorsa veya end-to-end latency SLA değerini geçiyorsa otomatik alert üretilmelidir.&lt;/p&gt;

&lt;p&gt;Bu nedenle iyi bir EDA monitoring tasarımı yalnızca “Kafka ayakta mı?” sorusuna değil, şu sorulara da cevap verebilmelidir:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Event beklenen zamanda geldi mi?
Event doğru aşamadan geçti mi?
Hangi aşamada gecikti?
Hangi consumer geride kaldı?
Hangi topic’te hata oranı arttı?
DLQ sayısı normal davranışın dışına çıktı mı?
Curated event downstream tüketiciye zamanında ulaştı mı?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Özellikle stage-based pipeline tasarımında her aşama için ayrı latency ve hata metrikleri izlenmelidir:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw -&amp;gt; validated latency
validated -&amp;gt; enriched latency
enriched -&amp;gt; curated latency
curated -&amp;gt; downstream latency
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Güvenlik ve Governance
&lt;/h2&gt;

&lt;p&gt;Enterprise EDA tasarımlarında güvenlik ve governance sonradan eklenmemelidir.&lt;/p&gt;

&lt;p&gt;Dikkat edilmesi gereken başlıklar:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kim hangi topic’e yazabilir?&lt;/li&gt;
&lt;li&gt;Kim hangi topic’i okuyabilir?&lt;/li&gt;
&lt;li&gt;Hassas veri event içinde taşınıyor mu?&lt;/li&gt;
&lt;li&gt;Masking veya tokenization gerekiyor mu?&lt;/li&gt;
&lt;li&gt;Event lineage takip ediliyor mu?&lt;/li&gt;
&lt;li&gt;Hangi consumer hangi veriyi tüketiyor?&lt;/li&gt;
&lt;li&gt;Audit log tutuluyor mu?&lt;/li&gt;
&lt;li&gt;Retention regülasyonlarla uyumlu mu?&lt;/li&gt;
&lt;li&gt;Lakehouse tarafında tablo erişimleri topic erişimleriyle tutarlı mı?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;EDA, sadece teknik bir streaming projesi değil; veri yönetişimi, güvenlik ve operasyon disiplini gerektiren bir platform yaklaşımıdır.&lt;/p&gt;

&lt;p&gt;Kafka tarafında topic-level access control, schema governance ve audit önemliyken; lakehouse tarafında table-level policy, lineage, data catalog ve veri sınıflandırma kritik hale gelir.&lt;/p&gt;

&lt;h2&gt;
  
  
  EDA’ya Nereden Başlamalı?
&lt;/h2&gt;

&lt;p&gt;EDA’ya başlarken ilk hedef tüm kurumu event-driven hale getirmek olmamalıdır. Daha doğru yaklaşım, net iş değeri olan bir pilot use case seçmektir.&lt;/p&gt;

&lt;p&gt;İyi başlangıç use case’leri:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fraud detection.&lt;/li&gt;
&lt;li&gt;Real-time transaction monitoring.&lt;/li&gt;
&lt;li&gt;IoT sensor monitoring.&lt;/li&gt;
&lt;li&gt;Customer activity tracking.&lt;/li&gt;
&lt;li&gt;Payment event streaming.&lt;/li&gt;
&lt;li&gt;Security log analytics.&lt;/li&gt;
&lt;li&gt;Real-time operational dashboard.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;İlk fazda şu çıktılar hedeflenmelidir:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Event domain modeli.&lt;/li&gt;
&lt;li&gt;Topic naming standardı.&lt;/li&gt;
&lt;li&gt;Schema standardı.&lt;/li&gt;
&lt;li&gt;Producer ve consumer contract’ları.&lt;/li&gt;
&lt;li&gt;Raw, validated, enriched, curated yaklaşımı.&lt;/li&gt;
&lt;li&gt;DLQ ve retry stratejisi.&lt;/li&gt;
&lt;li&gt;Lakehouse bronze/silver/gold eşleşme prensibi.&lt;/li&gt;
&lt;li&gt;Monitoring yaklaşımı.&lt;/li&gt;
&lt;li&gt;Security ve access modeli.&lt;/li&gt;
&lt;li&gt;Replay stratejisi.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Örnek Referans Mimari
&lt;/h2&gt;

&lt;p&gt;Basit bir EDA + lakehouse referans mimarisi şu şekilde olabilir:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Source Systems
      |
      v
Kaynak sistem adaptörleri / Custom Producers
      |
      v
Kafka Event Channels
      |
      +--&amp;gt; Stream Processing
      |        |
      |        +--&amp;gt; Validated / Enriched / Curated Topics
      |        +--&amp;gt; Alert Topics
      |        +--&amp;gt; DLQ Topics
      |
      +--&amp;gt; Lakehouse Bronze / Silver / Gold
      +--&amp;gt; Operational Database
      +--&amp;gt; BI / Dashboard
      +--&amp;gt; Machine Learning Pipelines
      +--&amp;gt; Notification Services
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Burada Kafka event taşıma omurgasını sağlar. Kaynak sistem adaptörleri veya custom producer uygulamaları veriyi Kafka event channel’larına taşır. Stream processing katmanı event’leri doğrulama, zenginleştirme, yönlendirme ve alert üretimi için kullanılır. Lakehouse ise kalıcı analitik veri katmanı olarak konumlanır.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sonuç
&lt;/h2&gt;

&lt;p&gt;Event Driven Architecture’da başarılı olmak için event üretmek yeterli değildir. Event’in platform içinde nasıl olgunlaştığı, nasıl doğrulandığı, nasıl zenginleştirildiği, hatalı kayıtların nasıl yönetildiği ve downstream tüketicilere nasıl güvenilir şekilde sunulduğu da en az event modelinin kendisi kadar önemlidir.&lt;/p&gt;

&lt;p&gt;Raw, validated, enriched ve curated yaklaşımı, akan verinin platform içinde kontrollü şekilde olgunlaşmasını sağlar. Bu yapı modern lakehouse mimarilerindeki Bronze, Silver ve Gold katmanlarıyla benzer bir düşünce yapısını paylaşır. Kafka tarafında bu katmanlar event channel olarak, lakehouse tarafında ise kalıcı ve sorgulanabilir veri setleri olarak karşılık bulur.&lt;/p&gt;

&lt;p&gt;Doğru tasarlanmış bir EDA + lakehouse mimarisi kurumlara iki önemli kabiliyeti aynı anda kazandırır: Gerçek zamanlı aksiyon ve güvenilir tarihsel analitik.&lt;/p&gt;

&lt;p&gt;Yanlış tasarlandığında ise Kafka topic’leri, stream processing job’ları, lakehouse tabloları, DLQ’lar ve consumer’lar arasında izlenmesi zor bir karmaşa oluşur.&lt;/p&gt;

&lt;p&gt;Bu nedenle EDA projelerine yalnızca topic açarak değil; event yaşam döngüsünü, lakehouse ilişkisini, replay stratejisini, monitoring yaklaşımını ve governance modelini birlikte tasarlayarak başlamak gerekir.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;English version of this article is also available on my profile.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>kafka</category>
      <category>streaming</category>
      <category>dataengineering</category>
      <category>turkish</category>
    </item>
    <item>
      <title>Part 2: Event Pipeline Design: The Real-Time Data Lifecycle from Kafka to Lakehouse</title>
      <dc:creator>Tayfun Yalcinkaya</dc:creator>
      <pubDate>Thu, 04 Jun 2026 18:01:50 +0000</pubDate>
      <link>https://dev.to/tayfun_yalcinkaya_9c29444/part-2-event-pipeline-design-the-real-time-data-lifecycle-from-kafka-to-lakehouse-2g16</link>
      <guid>https://dev.to/tayfun_yalcinkaya_9c29444/part-2-event-pipeline-design-the-real-time-data-lifecycle-from-kafka-to-lakehouse-2g16</guid>
      <description>&lt;p&gt;In the first article, we covered the core concepts of Event Driven Architecture, topic/channel design on Kafka, the difference between events and commands, schema contracts, and producer-consumer relationships. In this article, we will take one step further and look at the lifecycle of an event inside the platform.&lt;/p&gt;

&lt;p&gt;Because in EDA design, the real challenge is not only producing events. The real challenge is making those events reliable, traceable, reprocessable, enrichable, and usable by different consumers.&lt;/p&gt;

&lt;p&gt;In this article, we will focus on these questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What happens when a raw event arrives in the platform?&lt;/li&gt;
&lt;li&gt;How is an event validated, enriched, and made consumable?&lt;/li&gt;
&lt;li&gt;How should raw, validated, enriched, and curated topics be positioned?&lt;/li&gt;
&lt;li&gt;How can this structure be related to the Medallion approach in modern lakehouse architectures?&lt;/li&gt;
&lt;li&gt;When do DLQ and alert topics come into play?&lt;/li&gt;
&lt;li&gt;How should replay, idempotency, monitoring, security, and governance be designed?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Is an Event Pipeline?
&lt;/h2&gt;

&lt;p&gt;In EDA architectures, especially in data platform projects, events usually pass through a lifecycle.&lt;/p&gt;

&lt;p&gt;This lifecycle can be modeled like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw -&amp;gt; validated -&amp;gt; enriched -&amp;gt; curated
                  |             |
                  v             v
                 dlq          alert
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This structure allows the data flow to mature step by step.&lt;/p&gt;

&lt;p&gt;The raw topic carries the original event from the source. The validated topic contains events that passed schema and basic quality checks. The enriched topic contains events improved with reference data or other data sources. The curated topic represents trusted, normalized, and business-ready events for consumers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Relationship Between Event Pipeline and Medallion Architecture
&lt;/h2&gt;

&lt;p&gt;This structure has a natural similarity with the Medallion approach often used in modern lakehouse architectures.&lt;/p&gt;

&lt;p&gt;In the lakehouse world, the Bronze layer represents raw data, the Silver layer represents cleaned and enriched data, and the Gold layer represents business-ready data products. Kafka raw, validated, enriched, and curated topics apply a similar maturity logic to data in motion.&lt;/p&gt;

&lt;p&gt;However, there is an important difference. On the Kafka side, these stages work as event channels. On the lakehouse side, they become persistent, queryable, and governed datasets.&lt;/p&gt;

&lt;p&gt;We can think about it like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Kafka raw topic       -&amp;gt; Lakehouse bronze table
Kafka enriched topic  -&amp;gt; Lakehouse silver table
Kafka curated topic   -&amp;gt; Lakehouse gold table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is not a one-to-one or mandatory mapping. Not every topic must become a separate lakehouse table. But from an architectural point of view, both approaches aim to move data from a raw state to a trusted and consumable state.&lt;/p&gt;

&lt;p&gt;A more accurate distinction is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Data in motion: Kafka topics
Data at rest: Lakehouse tables
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kafka provides real-time flow, consumer independence, fan-out, low latency, and replay capability. The lakehouse provides persistent storage, historical analysis, SQL access, BI/ML consumption, data governance, and analytical data products.&lt;/p&gt;

&lt;h2&gt;
  
  
  Raw Topic
&lt;/h2&gt;

&lt;p&gt;The raw topic is the first channel where the original event from the source is written.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw.payment.transaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this stage, the data is stored as it comes from the source. The format may be incorrect, fields may be missing, or the message may not fully match the expected schema. The raw layer is valuable for replay, audit, and troubleshooting.&lt;/p&gt;

&lt;p&gt;The raw topic can also be the source for the bronze layer in the lakehouse. This creates a link between the streaming event flow and the analytical raw data archive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Validated Topic
&lt;/h2&gt;

&lt;p&gt;The validated topic contains events that passed schema and basic data quality checks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;validated.payment.transaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Typical checks at this stage include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Are required fields available?&lt;/li&gt;
&lt;li&gt;Does the event match the schema?&lt;/li&gt;
&lt;li&gt;Are date, number, and currency formats correct?&lt;/li&gt;
&lt;li&gt;Is there an event ID?&lt;/li&gt;
&lt;li&gt;Is the event time valid?&lt;/li&gt;
&lt;li&gt;Is duplicate control required?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A validation service consumes the raw topic and writes successful events to the validated topic. Failed events can be written to a DLQ topic.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw.payment.transaction
        |
        v
validation-service
        |
        +--&amp;gt; validated.payment.transaction
        +--&amp;gt; dlq.payment.transaction.validation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The validated topic prevents downstream processes from working directly with raw and unreliable data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enriched Topic
&lt;/h2&gt;

&lt;p&gt;The enriched topic contains the validated event after additional information is added.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enriched.payment.transaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, the raw event may contain only customer ID and transaction details:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"transaction_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"T1001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"customer_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C789"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"merchant_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"M456"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;950&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"currency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"TRY"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After enrichment, the event may include customer segment, merchant category, country, risk score, or location information:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"transaction_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"T1001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"customer_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C789"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"customer_segment"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"premium"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"merchant_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"M456"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"merchant_category"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"electronics"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"country"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"TR"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;950&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"currency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"TRY"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"risk_score"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this stage, the consumer is no longer only moving data. It may join with other sources, perform lookups, or match reference data.&lt;/p&gt;

&lt;p&gt;From a lakehouse perspective, enriched events are often meaningful inputs for the silver layer. The data is no longer raw. It has passed certain quality checks and has become more useful for analytics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Curated Topic
&lt;/h2&gt;

&lt;p&gt;The curated topic contains trusted, normalized, and business-ready events for consumers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curated.payment.transaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The curated layer is the level where most downstream consumers should connect. BI, dashboards, data lake ingestion, machine learning feature pipelines, notification services, and operational analytics usually consume curated events.&lt;/p&gt;

&lt;p&gt;On the lakehouse side, curated events can feed gold-layer data products. For example, operational dashboards, customer segment analysis, fraud KPIs, or payment success rate metrics can be created from curated events.&lt;/p&gt;

&lt;h2&gt;
  
  
  Alert Topic
&lt;/h2&gt;

&lt;p&gt;The alert topic is the channel where action-oriented events are published, such as alarms, fraud alerts, threshold breaches, or anomalies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alert.payment.fraud
alert.machine.temperature
alert.network.anomaly
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The alert topic does not always have to be the final step of a linear pipeline. It can be produced by a separate stream processing job consuming from validated, enriched, or curated topics.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enriched.payment.transaction
        |
        v
fraud-detection-service
        |
        +--&amp;gt; alert.payment.fraud
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alert topics are designed for operational reaction. For this reason, retention, consumer SLA, retry behavior, and notification integration should be considered separately.&lt;/p&gt;

&lt;h2&gt;
  
  
  DLQ Topic
&lt;/h2&gt;

&lt;p&gt;DLQ means Dead Letter Queue. It is the channel where failed or unprocessable events are sent.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dlq.payment.transaction.validation
dlq.payment.transaction.enrichment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A DLQ event should not only contain the failed payload. It should also contain the reason for the failure.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"original_topic"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"raw.payment.transaction"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"original_partition"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"original_offset"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;982133&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"error_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"VALIDATION_ERROR"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"error_message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"customer_id is missing"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"failed_at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-05-13T12:30:00Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"payload"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"transaction_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"T1001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;950&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This approach prevents failed records from being lost and makes later correction, investigation, or replay possible.&lt;/p&gt;

&lt;p&gt;In EDA projects without a DLQ design, failed events either disappear silently or create continuous retries on the consumer side, slowing down the whole pipeline.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does Every Stage Have to Be a Separate Topic?
&lt;/h2&gt;

&lt;p&gt;No. Raw, validated, enriched, and curated stages do not always need to be physical Kafka topics.&lt;/p&gt;

&lt;p&gt;There are three common approaches.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Stage-Based Pipeline
&lt;/h3&gt;

&lt;p&gt;Each stage is modeled as a separate topic.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw -&amp;gt; validated -&amp;gt; enriched -&amp;gt; curated
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This model is strong for observability, replay, audit, and team responsibility separation. However, it increases the number of topics and operational complexity.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Single Processor, Multi-Output
&lt;/h3&gt;

&lt;p&gt;A single stream processing job reads the raw topic, performs validation, enrichment, and curation, and writes only to result topics.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw.payment.transaction
        |
        v
stream-processing-job
        |
        +--&amp;gt; curated.payment.transaction
        +--&amp;gt; alert.payment.fraud
        +--&amp;gt; dlq.payment.transaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This model creates fewer topics and lower latency. However, debugging and replay may be harder because intermediate stages are not visible.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Branching Pipeline
&lt;/h3&gt;

&lt;p&gt;Multiple consumers read from the same topic for different purposes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;validated.payment.transaction
        |
        +--&amp;gt; enrichment-service
        +--&amp;gt; audit-sink-service
        +--&amp;gt; fraud-service
        +--&amp;gt; realtime-dashboard-service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is one of the strongest parts of EDA. The same event can be used by multiple independent consumers for different purposes.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Kafka and Lakehouse Work Together
&lt;/h2&gt;

&lt;p&gt;In a well-designed EDA architecture, Kafka and the lakehouse are not alternatives to each other. They complement each other.&lt;/p&gt;

&lt;p&gt;Kafka is used for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Event transport.&lt;/li&gt;
&lt;li&gt;Low-latency processing.&lt;/li&gt;
&lt;li&gt;Consumer fan-out.&lt;/li&gt;
&lt;li&gt;Operational reaction.&lt;/li&gt;
&lt;li&gt;Replay.&lt;/li&gt;
&lt;li&gt;Loose coupling between systems.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The lakehouse is used for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Persistent storage.&lt;/li&gt;
&lt;li&gt;Historical analysis.&lt;/li&gt;
&lt;li&gt;SQL analytics.&lt;/li&gt;
&lt;li&gt;BI and dashboards.&lt;/li&gt;
&lt;li&gt;Machine learning feature generation.&lt;/li&gt;
&lt;li&gt;Governance, lineage, and data products.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An example flow may look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw.payment.transaction
        |
        +--&amp;gt; bronze.payment_transaction_raw
        |
        v
validation-service
        |
        +--&amp;gt; validated.payment.transaction
        +--&amp;gt; dlq.payment.transaction
        |
        v
enrichment-service
        |
        +--&amp;gt; enriched.payment.transaction
        +--&amp;gt; silver.payment_transaction_enriched
        |
        v
curation-service
        |
        +--&amp;gt; curated.payment.transaction
        +--&amp;gt; gold.payment_transaction_analytics
        +--&amp;gt; alert.payment.fraud
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this model, Kafka manages data in motion, while the lakehouse manages data at rest.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Same Scenario from a Pipeline Perspective: From Streaming to Archive and Analytics
&lt;/h2&gt;

&lt;p&gt;In the first article, we looked at the anonymized energy distribution field example from a channel-based topic design perspective. Now let’s look at the same scenario from an event pipeline perspective.&lt;/p&gt;

&lt;p&gt;In this architecture, XML-based meter and activity messages from different sources first arrived in a secure Kafka ingress layer. Because of security and operational isolation needs, data from external sources was not taken directly into the internal platform. Instead, a controlled ingress approach was preferred. In such architectures, separating the external or semi-external data landing layer from the internal event backbone provides important benefits for security and operational management.&lt;/p&gt;

&lt;p&gt;In the next step, the stream processing layer read messages from Kafka, parsed the XML content, interpreted the messages, and routed them to target systems. For operational processes, data was written to a relational database. For raw and historical analysis needs, a separate big data/archive layer was fed. As a result, the same event flow served both daily operational needs and historical query and analytics scenarios.&lt;/p&gt;

&lt;p&gt;This structure is a good field example of the relationship between EDA and lakehouse thinking. On the Kafka side, flowing events provided real-time transport, separation, and consumer independence. On the archive and analytics side, raw data storage, historical querying, anomaly detection, and forecasting scenarios were supported. If we use modern lakehouse terminology, raw meter messages correspond to a bronze-like archive layer, parsed and interpreted data corresponds to a silver-like analytics layer, and operational dashboards or reporting outputs correspond to gold-like consumption layers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Kafka raw meter topics
        |
        +--&amp;gt; Raw archive / bronze-like layer
        |
        v
stream processing / parsing / enrichment
        |
        +--&amp;gt; Operational database
        +--&amp;gt; Search and historical query layer
        +--&amp;gt; Analytics and forecasting layer
        +--&amp;gt; Dashboard and alert mechanisms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this scenario, Kafka retention was also a critical part of the architecture. When a target system slowed down, became temporarily unavailable, or went under maintenance, Kafka acted as a controlled durability layer to prevent data loss. Consumers could continue reading from their last committed offset when the system became healthy again. This shows why retention and replay design in EDA is not only a technical setting, but also a business continuity decision.&lt;/p&gt;

&lt;p&gt;Operational visibility was as important as data transport. Monitoring the number of messages received by distribution company and data type in the last seconds and hours, checking whether data arrived at the expected frequency, and producing alerts for flow interruptions made the platform not only working, but also observable.&lt;/p&gt;

&lt;p&gt;The main lesson from this example is this: EDA is not only about systems writing events to Kafka. A real enterprise data flow architecture appears when secure data ingress, topic design, stream processing, retention, replay, operational monitoring, archiving, and analytics layers are designed together.&lt;/p&gt;

&lt;p&gt;In such a flow, XML messages that cannot be parsed, missing meter information, unexpected format changes, or target system write errors should not stop the main pipeline. For this reason, DLQ or quarantine-style error flows should not be treated as later improvements. In large-scale architectures like this, they should be considered a natural part of the design.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Consumer Idempotency Matters
&lt;/h2&gt;

&lt;p&gt;In Kafka-based systems, we should always assume that consumers may process the same event more than once. Duplicate processing can happen because of network issues, retries, offset commit problems, or application restarts.&lt;/p&gt;

&lt;p&gt;For this reason, consumers should be designed to be idempotent.&lt;/p&gt;

&lt;p&gt;This means that processing the same event twice should not change the final result.&lt;/p&gt;

&lt;p&gt;For example, if a payment event arrives twice, the customer should not receive two refunds. To prevent this, duplicate checks should be performed using event_id, transaction_id, or a business key.&lt;/p&gt;

&lt;p&gt;Idempotency is especially critical for these consumers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Consumers performing financial operations.&lt;/li&gt;
&lt;li&gt;Services sending notifications.&lt;/li&gt;
&lt;li&gt;Sinks writing to operational databases.&lt;/li&gt;
&lt;li&gt;Systems producing alerts.&lt;/li&gt;
&lt;li&gt;Jobs performing upsert or merge operations on lakehouse tables.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Replay Design
&lt;/h2&gt;

&lt;p&gt;One of the strengths of EDA is that events can be retained in Kafka for a certain time and read again when needed.&lt;/p&gt;

&lt;p&gt;Replay may be needed in these situations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A new consumer wants to process past events from the beginning.&lt;/li&gt;
&lt;li&gt;An incorrect enrichment logic is fixed and events must be processed again.&lt;/li&gt;
&lt;li&gt;Missing events need to be reloaded into the data lake.&lt;/li&gt;
&lt;li&gt;A machine learning feature pipeline must be rebuilt.&lt;/li&gt;
&lt;li&gt;Records in the DLQ are corrected and sent back to the flow.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Replay is powerful, but it also carries risk. During replay, downstream systems must not create duplicate records, and irreversible actions such as financial transactions must not be triggered again.&lt;/p&gt;

&lt;p&gt;Replay design should answer these questions from the beginning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is Kafka retention long enough?&lt;/li&gt;
&lt;li&gt;Are raw events archived in the lakehouse bronze layer?&lt;/li&gt;
&lt;li&gt;Are consumers idempotent?&lt;/li&gt;
&lt;li&gt;Will replay be done with a separate consumer group?&lt;/li&gt;
&lt;li&gt;Will replayed events trigger operational actions again?&lt;/li&gt;
&lt;li&gt;Which topics are considered safe for replay?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Monitoring and Operations
&lt;/h2&gt;

&lt;p&gt;Operational visibility must be part of EDA design.&lt;/p&gt;

&lt;p&gt;Key metrics to monitor include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Topic throughput.&lt;/li&gt;
&lt;li&gt;Producer error rate.&lt;/li&gt;
&lt;li&gt;Consumer lag.&lt;/li&gt;
&lt;li&gt;Consumer processing time.&lt;/li&gt;
&lt;li&gt;Failed event count.&lt;/li&gt;
&lt;li&gt;DLQ event count.&lt;/li&gt;
&lt;li&gt;Partition skew.&lt;/li&gt;
&lt;li&gt;Broker disk usage.&lt;/li&gt;
&lt;li&gt;Replication status.&lt;/li&gt;
&lt;li&gt;End-to-end latency.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is not enough to know that the Kafka cluster is running. We must also know how long it takes for an event to move from the source to the target consumer, and where it is waiting in the pipeline.&lt;/p&gt;

&lt;p&gt;To achieve this level of visibility, monitoring should not depend only on infrastructure metrics. The event itself should also be traceable. For this reason, standard fields should be carried either in the event payload or in the event metadata.&lt;/p&gt;

&lt;p&gt;The following fields become critical for tracking the journey of an event inside the platform:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;event_id          -&amp;gt; Unique identifier of the event
event_type        -&amp;gt; Type of the event
event_time        -&amp;gt; Time when the event was created in the source system
source_system     -&amp;gt; Source system that produced the event
correlation_id    -&amp;gt; Identifier used to connect events from the same business flow
schema_version    -&amp;gt; Version of the event schema
processing_stage  -&amp;gt; Current stage of the event inside the pipeline
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With these fields, we can track not only whether an event was written to a Kafka topic, but also which stages it passed through inside the platform.&lt;/p&gt;

&lt;p&gt;For example, different timestamps can be captured for the same event:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;event_time                -&amp;gt; Time when the event was created in the source system
ingestion_time            -&amp;gt; Time when the event was first written to Kafka
validation_time           -&amp;gt; Time when the event passed the validation stage
enrichment_time           -&amp;gt; Time when the event passed the enrichment stage
curation_time             -&amp;gt; Time when the event was written to the curated topic
downstream_delivery_time  -&amp;gt; Time when the event reached the target system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This approach makes it possible to measure end-to-end latency more accurately. It also helps identify whether the delay happened in the source system, Kafka topic, stream processing job, downstream sink, or lakehouse write layer.&lt;/p&gt;

&lt;p&gt;In practice, monitoring design should be handled at three levels:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Platform level
   Broker health
   Disk usage
   Replication status
   Partition distribution

2. Flow level
   Topic throughput
   Consumer lag
   Failed event count
   DLQ count

3. Event lifecycle level
   End-to-end latency
   Stage latency
   Correlation ID based tracking
   Event freshness
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Managing this level of visibility only with manual scripts, separate dashboards, or scattered alert rules can become difficult over time. Especially in enterprise environments, platforms with advanced monitoring, observability, alerting, and governance capabilities for Kafka operations can reduce this operational burden.&lt;/p&gt;

&lt;p&gt;For example, enterprise Kafka distributions such as Cloudera Kafka, Confluent Platform, or similar Kafka platforms can provide a more centralized approach for topic-level monitoring, consumer lag tracking, cluster health checks, capacity planning, security integration, audit, and operational alert management.&lt;/p&gt;

&lt;p&gt;The goal is not only to collect metrics, but to make Kafka-based event flows operationally manageable. In EDA, monitoring is not just about seeing a few charts on a dashboard. It is a continuous validation mechanism that confirms whether the data flow is healthy, secure, traceable, and aligned with SLAs.&lt;/p&gt;

&lt;p&gt;Alert thresholds should also be defined from the beginning for every critical pipeline. For example, an automatic alert should be produced when data does not arrive from a specific source within the expected time, consumer lag exceeds a defined threshold, DLQ count rises above normal behavior, or end-to-end latency violates the SLA.&lt;/p&gt;

&lt;p&gt;For this reason, a good EDA monitoring design should answer not only the question “Is Kafka running?”, but also the following questions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Did the event arrive at the expected time?
Did the event pass through the correct stage?
At which stage was it delayed?
Which consumer is falling behind?
Which topic has an increasing error rate?
Did the DLQ count move outside normal behavior?
Did the curated event reach the downstream consumer on time?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Especially in a stage-based pipeline, latency and error metrics should be monitored for each stage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw -&amp;gt; validated latency
validated -&amp;gt; enriched latency
enriched -&amp;gt; curated latency
curated -&amp;gt; downstream latency
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Security and Governance
&lt;/h2&gt;

&lt;p&gt;In enterprise EDA designs, security and governance should not be added later.&lt;/p&gt;

&lt;p&gt;Important questions include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who can write to which topic?&lt;/li&gt;
&lt;li&gt;Who can read from which topic?&lt;/li&gt;
&lt;li&gt;Does the event contain sensitive data?&lt;/li&gt;
&lt;li&gt;Is masking or tokenization required?&lt;/li&gt;
&lt;li&gt;Is event lineage tracked?&lt;/li&gt;
&lt;li&gt;Which consumer reads which data?&lt;/li&gt;
&lt;li&gt;Are audit logs available?&lt;/li&gt;
&lt;li&gt;Is retention aligned with regulations?&lt;/li&gt;
&lt;li&gt;Are lakehouse table permissions consistent with topic permissions?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;EDA is not only a technical streaming project. It is a platform approach that requires data governance, security, and operational discipline.&lt;/p&gt;

&lt;p&gt;On the Kafka side, topic-level access control, schema governance, and audit are important. On the lakehouse side, table-level policies, lineage, data catalog, and data classification become critical.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Should You Start with EDA?
&lt;/h2&gt;

&lt;p&gt;When starting with EDA, the first goal should not be making the whole organization event-driven. A better approach is to choose a pilot use case with clear business value.&lt;/p&gt;

&lt;p&gt;Good starting use cases include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fraud detection.&lt;/li&gt;
&lt;li&gt;Real-time transaction monitoring.&lt;/li&gt;
&lt;li&gt;IoT sensor monitoring.&lt;/li&gt;
&lt;li&gt;Customer activity tracking.&lt;/li&gt;
&lt;li&gt;Payment event streaming.&lt;/li&gt;
&lt;li&gt;Security log analytics.&lt;/li&gt;
&lt;li&gt;Real-time operational dashboard.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first phase should produce these outputs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Event domain model.&lt;/li&gt;
&lt;li&gt;Topic naming standard.&lt;/li&gt;
&lt;li&gt;Schema standard.&lt;/li&gt;
&lt;li&gt;Producer and consumer contracts.&lt;/li&gt;
&lt;li&gt;Raw, validated, enriched, curated approach.&lt;/li&gt;
&lt;li&gt;DLQ and retry strategy.&lt;/li&gt;
&lt;li&gt;Lakehouse bronze/silver/gold mapping principles.&lt;/li&gt;
&lt;li&gt;Monitoring approach.&lt;/li&gt;
&lt;li&gt;Security and access model.&lt;/li&gt;
&lt;li&gt;Replay strategy.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Example Reference Architecture
&lt;/h2&gt;

&lt;p&gt;A simple EDA + lakehouse reference architecture can look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Source Systems
      |
      v
Source system adapters / Custom Producers
      |
      v
Kafka Event Channels
      |
      +--&amp;gt; Stream Processing
      |        |
      |        +--&amp;gt; Validated / Enriched / Curated Topics
      |        +--&amp;gt; Alert Topics
      |        +--&amp;gt; DLQ Topics
      |
      +--&amp;gt; Lakehouse Bronze / Silver / Gold
      +--&amp;gt; Operational Database
      +--&amp;gt; BI / Dashboard
      +--&amp;gt; Machine Learning Pipelines
      +--&amp;gt; Notification Services
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, Kafka provides the event transport backbone. Source system adapters or custom producer applications move data into Kafka event channels. The stream processing layer validates, enriches, routes, and produces alerts from events. The lakehouse is positioned as the persistent analytical data layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion of the Second Article
&lt;/h2&gt;

&lt;p&gt;In Event Driven Architecture, producing events is not enough. How events mature inside the platform, how they are validated, how they are enriched, how failed records are handled, and how they are safely provided to downstream consumers are as important as the event model itself.&lt;/p&gt;

&lt;p&gt;The raw, validated, enriched, and curated approach allows streaming data to mature in a controlled way inside the platform. This structure shares a similar way of thinking with the Bronze, Silver, and Gold layers in modern lakehouse architectures. On the Kafka side, these stages appear as event channels. On the lakehouse side, they become persistent and queryable datasets.&lt;/p&gt;

&lt;p&gt;A well-designed EDA + lakehouse architecture gives organizations two important capabilities at the same time: real-time action and reliable historical analytics.&lt;/p&gt;

&lt;p&gt;If it is poorly designed, Kafka topics, stream processing jobs, lakehouse tables, DLQs, and consumers can become a complex system that is hard to trace.&lt;/p&gt;

&lt;p&gt;For this reason, EDA projects should not start only by creating topics. They should start by designing the event lifecycle, the lakehouse relationship, the replay strategy, the monitoring approach, and the governance model together.&lt;/p&gt;

</description>
      <category>kafka</category>
      <category>architecture</category>
      <category>streaming</category>
      <category>dataengineering</category>
    </item>
    <item>
      <title>Bölüm 1 - Kafka ile Event Driven Architecture (EDA): Event ve Channel Tasarımını Doğru Yapmak</title>
      <dc:creator>Tayfun Yalcinkaya</dc:creator>
      <pubDate>Wed, 13 May 2026 16:07:42 +0000</pubDate>
      <link>https://dev.to/tayfun_yalcinkaya_9c29444/kafka-ile-event-driven-architecture-eda-event-ve-channel-tasarimini-dogru-yapmak-1i23</link>
      <guid>https://dev.to/tayfun_yalcinkaya_9c29444/kafka-ile-event-driven-architecture-eda-event-ve-channel-tasarimini-dogru-yapmak-1i23</guid>
      <description>&lt;p&gt;Bu yazı, Event Driven Architecture ve Kafka tabanlı event/channel tasarımını Türkçe teknik kaynak ihtiyacını da gözeterek hazırlanmış bir yazı dizisinin ilk bölümüdür.&lt;/p&gt;

&lt;p&gt;Enterprise kurumlar, karar alma süreçlerini saatler veya günler sonra çalışan batch analitiklere bırakmak yerine, olaylar gerçekleştiği anda tepki verebilen mimarilere yöneliyor. Fraud detection, gerçek zamanlı müşteri deneyimi, IoT izleme, ödeme sistemleri, operasyonel dashboardlar ve güvenlik analitiği gibi alanlarda Event Driven Architecture (EDA), artık yalnızca modern bir entegrasyon yaklaşımı değil; gerçek zamanlı veri platformlarının temel yapı taşlarından biri haline geliyor.&lt;/p&gt;

&lt;p&gt;Bunun nedeni basit: Birçok kurumda kronikleşen batch analitik problemleri yalnızca teknoloji problemi değil, zamanlama problemidir. Veri önce toplanır, sonra taşınır, sonra işlenir, sonra raporlanır. Ancak iş kararı çoktan gecikmiş olabilir. EDA, doğru tasarlandığında bu gecikmeyi azaltır; veriyi bekletmeden, olay gerçekleştiği anda işleyerek daha düşük latency, daha hızlı aksiyon ve daha esnek entegrasyon modeli sağlar.&lt;/p&gt;

&lt;p&gt;Bu noktada EDA’yı batch işlemenin doğrudan alternatifi gibi değil, onu tamamlayan farklı bir mimari refleks olarak konumlandırmak daha doğru olur. Büyük tarihsel veri işleme, dönemsel raporlama, mali kapanış veya yoğun toplu dönüşüm işleri hâlâ batch dünyasının güçlü olduğu alanlardır. EDA’nın fark yarattığı yer ise verinin sürekli aktığı, kararın gecikmeden verilmesi gerektiği ve sistemlerin olaylara anlık tepki üretmesinin beklendiği senaryolardır.&lt;/p&gt;

&lt;p&gt;Data management platformlarında yanlış tasarlanan Event Driven Architecture yaklaşımları ise zamanla streaming akışlarını ve gerçek zamanlı analitikleri tam bir karmaşaya dönüştürebilir. Başlangıçta “Kafka topic açalım, sistemler oraya yazsın” gibi basit görünen kararlar; birkaç ay sonra kontrolsüz topic büyümesi, belirsiz event sahipliği, hatalı veri yayılımı, tüketici bağımlılıkları, tekrar işleme problemleri ve izlenemeyen veri akışları olarak geri döner.&lt;/p&gt;

&lt;p&gt;Bu yazı dizisinin omurgasını iki soru oluşturuyor: Event’i nasıl tasarlamalıyız ve event platform içinde nasıl olgunlaşmalı? İlk yazıda event’in kendisine odaklanacağız; event-command ayrımı, Kafka topic/channel modeli, schema contract, partition key, producer-consumer ilişkisi ve sık yapılan tasarım hatalarını ele alacağız. İkinci yazıda ise event’in platform içindeki yaşam döngüsüne bakacağız; raw’dan curated event’lere uzanan pipeline’ı, DLQ ve alert topic’lerini, replay, monitoring, governance ve modern lakehouse mimarilerindeki Medallion yaklaşımıyla kurulan ilişkiyi inceleyeceğiz.&lt;/p&gt;

&lt;h2&gt;
  
  
  Event Driven Architecture Nedir?
&lt;/h2&gt;

&lt;p&gt;Event Driven Architecture, sistemlerin birbirleriyle doğrudan ve senkron çağrılar üzerinden değil, gerçekleşen olaylar üzerinden haberleştiği bir mimari yaklaşımdır.&lt;/p&gt;

&lt;p&gt;Bir event, sistemde gerçekleşmiş anlamlı bir iş olayını temsil eder:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Müşteri oluşturuldu.&lt;/li&gt;
&lt;li&gt;Ödeme tamamlandı.&lt;/li&gt;
&lt;li&gt;Kart işlemi başarısız oldu.&lt;/li&gt;
&lt;li&gt;Stok seviyesi kritik eşiğin altına düştü.&lt;/li&gt;
&lt;li&gt;Sensör sıcaklığı limit değerini aştı.&lt;/li&gt;
&lt;li&gt;Kullanıcı mobil uygulamaya giriş yaptı.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Buradaki önemli nokta şudur: Event bir istek değil, gerçekleşmiş bir durum bilgisidir.&lt;/p&gt;

&lt;p&gt;Örneğin:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PaymentCompleted
CustomerCreated
OrderShipped
MachineTemperatureExceeded
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bunlar event’tir. Çünkü geçmişte olmuş bir şeyi bildirirler.&lt;/p&gt;

&lt;p&gt;Buna karşılık:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CreatePayment
UpdateCustomer
SendNotification
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;bunlar daha çok command yapısına yakındır. Yani bir sisteme bir şey yaptırma niyeti taşır. EDA tasarımında event ile command ayrımını doğru yapmak kritik önemdedir.&lt;/p&gt;

&lt;h2&gt;
  
  
  Klasik Entegrasyon ile EDA Arasındaki Fark
&lt;/h2&gt;

&lt;p&gt;Klasik mimarilerde sistemler genellikle birbirini doğrudan çağırır.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application A ---&amp;gt; Application B ---&amp;gt; Application C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu model küçük ölçekte basit görünür. Ancak sistem sayısı arttıkça bağımlılıklar büyür. Bir servisin yavaşlaması, hata alması veya değişmesi zincirdeki diğer sistemleri de etkileyebilir.&lt;/p&gt;

&lt;p&gt;EDA’da ise sistemler doğrudan birbirine bağımlı olmak yerine olay yayınlar ve bu olaylarla ilgilenen sistemler ilgili event’i tüketir.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application A ---&amp;gt; Event Channel ---&amp;gt; Application B
                               |----&amp;gt; Application C
                               |----&amp;gt; Application D
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu model sayesinde üretici sistem, event’i kimin tüketeceğini bilmek zorunda kalmaz. Yeni bir tüketici eklemek için mevcut producer uygulamayı değiştirmeye gerek kalmaz.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kafka EDA İçinde Nerede Durur?
&lt;/h2&gt;

&lt;p&gt;Kafka, EDA mimarilerinde çoğunlukla event backbone, event bus veya event streaming platform olarak konumlanır.&lt;/p&gt;

&lt;p&gt;Kafka’nın temel kavramları şunlardır:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Producer:&lt;/strong&gt; Event üreten uygulama.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Topic:&lt;/strong&gt; Event’lerin yazıldığı mantıksal kanal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Partition:&lt;/strong&gt; Topic içindeki paralel işleme birimi.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consumer:&lt;/strong&gt; Event okuyan uygulama.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consumer Group:&lt;/strong&gt; Aynı işi paylaşarak yapan consumer kümesi.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Broker:&lt;/strong&gt; Kafka cluster içindeki sunucular.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offset:&lt;/strong&gt; Consumer’ın topic içinde nereye kadar okuduğunu gösteren pozisyon.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retention:&lt;/strong&gt; Event’lerin Kafka üzerinde ne kadar süre tutulacağını belirleyen süre veya boyut politikası.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Basit bir Kafka tabanlı EDA akışı şöyle düşünülebilir:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Source System
     |
     v
Kafka Topic / Event Channel
     |
     +--&amp;gt; Real-time Analytics
     +--&amp;gt; Notification Service
     +--&amp;gt; Data Lake Ingestion
     +--&amp;gt; Fraud Detection
     +--&amp;gt; Monitoring Dashboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Burada Kafka topic’leri, sistemler arasında event taşıyan channel’lar gibi davranır.&lt;/p&gt;

&lt;h2&gt;
  
  
  Channel-Based Kafka Tasarımı Ne Anlama Gelir?
&lt;/h2&gt;

&lt;p&gt;Channel-based yapı, genellikle event tiplerinin veya iş domain’lerinin Kafka topic’leri üzerinden ayrıştırılması anlamına gelir.&lt;/p&gt;

&lt;p&gt;Örneğin bir ödeme sistemi için:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;payment.transaction.created
payment.transaction.authorized
payment.transaction.completed
payment.transaction.failed
payment.transaction.reversed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Müşteri domain’i için:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;customer.created
customer.updated
customer.segment.changed
customer.status.changed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;IoT veya üretim senaryosu için:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;machine.telemetry.raw
machine.telemetry.enriched
machine.alert.temperature
machine.maintenance.predicted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Burada her topic bir event channel’dır. Producer uygulama ilgili channel’a event yazar. Consumer uygulamalar ise ilgilendikleri channel’ları okuyarak kendi işlerini yapar.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sahadan Anonimleştirilmiş Bir Örnek: Enerji Dağıtım Verilerinde Channel-Based Tasarım
&lt;/h2&gt;

&lt;p&gt;Aşağıdaki örnek, enerji dağıtım alanında yürütülmüş büyük ölçekli bir veri platformu çalışmasından anonimleştirilerek aktarılmıştır. Kurum ve proje adı paylaşmadan, sahada karşılaşılan mimari ihtiyaçları ve EDA tasarım kararlarını görünür kılmayı amaçlıyor.&lt;/p&gt;

&lt;p&gt;Bu senaryoda temel ihtiyaç, ülke genelindeki akıllı sayaç ve aydınlatma altyapısından gelen verilerin merkezi olarak toplanması, güvenli biçimde taşınması, işlenmesi ve analiz edilebilir hale getirilmesiydi. İlk bakışta bu bir entegrasyon projesi gibi görünebilir. Ancak veri hacmi, kaynak sistem sayısı, 7/24 çalışma ihtiyacı, güvenlik beklentisi ve operasyonel izleme gereksinimi düşünüldüğünde problem aslında klasik entegrasyondan çok daha fazlasıydı: gerçek zamanlı ve kesintisiz çalışan bir veri akışı mimarisi tasarlamak gerekiyordu.&lt;/p&gt;

&lt;p&gt;Sahada karşılaşılan en kritik kararlardan biri Kafka topic tasarımıydı. Birden fazla dağıtım şirketinden farklı tiplerde sayaç verileri alınıyordu: elektrik tüketim verileri, sayaç aktivite bilgileri, çevrim içi/çevrim dışı durumları ve operasyonel sinyaller. Tüm veriyi tek bir büyük topic’e yazmak ilk bakışta daha basit görünebilirdi; ancak bu yaklaşım consumer tarafında ayrıştırma, ölçekleme, hata yönetimi ve izleme açısından ciddi karmaşa yaratacaktı.&lt;/p&gt;

&lt;p&gt;Bu nedenle kaynak ve veri tipi bazlı channel yaklaşımı tercih edildi. Dağıtım şirketi ve veri tipi kırılımında onlarca Kafka topic’i tasarlanarak her akışın ayrı izlenebilmesi, ayrı tüketilebilmesi ve gerektiğinde bağımsız ölçeklenebilmesi sağlandı.&lt;/p&gt;

&lt;p&gt;Örnek olarak bu mantık şu şekilde düşünülebilir:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw.energy.meter.reading.&amp;lt;source&amp;gt;
raw.energy.meter.status.&amp;lt;source&amp;gt;
raw.energy.lighting.consumption.&amp;lt;source&amp;gt;
raw.energy.device.activity.&amp;lt;source&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu tasarımda Kafka yalnızca mesaj taşıyan bir ara katman değil, farklı kaynaklardan gelen yüksek hacimli veriyi düzenli kanallar üzerinden ayrıştıran merkezi event backbone rolünü üstlendi. Böylece gerçek zamanlı izleme servisleri, operasyonel veritabanına yazan consumer’lar, arşivleme süreçleri ve analitik platformlar aynı veri akışından bağımsız olarak beslenebildi.&lt;/p&gt;

&lt;p&gt;Bu örneğin gösterdiği temel ders şudur: Channel-based Kafka tasarımında topic sayısının artması tek başına problem değildir. Asıl problem, topic’lerin hangi domain’e, hangi veri tipine, hangi sahipliğe ve hangi tüketim amacına hizmet ettiğinin belirsiz olmasıdır.&lt;/p&gt;

&lt;h2&gt;
  
  
  Event mi Command mı?
&lt;/h2&gt;

&lt;p&gt;EDA tasarımında sık yapılan hatalardan biri event ile command kavramlarını karıştırmaktır.&lt;/p&gt;

&lt;p&gt;Event, gerçekleşmiş bir iş olayını ifade eder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PaymentCompleted
CustomerCreated
OrderShipped
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Command ise bir sisteme yapılması istenen aksiyonu ifade eder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CreatePayment
UpdateCustomer
SendNotification
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kafka üzerinde command da taşınabilir; ancak bu durumda timeout, retry, correlation, response handling ve idempotency gibi konular daha karmaşık hale gelir. Bu nedenle Kafka tabanlı EDA tasarımında mümkün olduğunca “gerçekleşmiş olayları” modellemek daha sağlıklı bir başlangıçtır.&lt;/p&gt;

&lt;h2&gt;
  
  
  Business Event State ile Data Pipeline Stage Karıştırılmamalı
&lt;/h2&gt;

&lt;p&gt;EDA tasarımında bir diğer kritik ayrım, business state ile data processing stage arasındadır.&lt;/p&gt;

&lt;p&gt;Business event lifecycle şuna benzer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PaymentInitiated -&amp;gt; PaymentAuthorized -&amp;gt; PaymentCompleted -&amp;gt; PaymentSettled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Data pipeline stage ise şuna benzer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw -&amp;gt; validated -&amp;gt; enriched -&amp;gt; curated
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;İlki iş sürecinin durum değişimini anlatır. İkincisi verinin platform içinde işlenme olgunluğunu anlatır. Bu iki kavramı ayırmak, doğru topic tasarımı için çok önemlidir.&lt;/p&gt;

&lt;p&gt;İlk yazıda daha çok business event ve channel tasarımına odaklanıyoruz. İkinci yazıda ise raw, validated, enriched ve curated gibi data pipeline aşamalarını detaylandıracağız.&lt;/p&gt;

&lt;h2&gt;
  
  
  Topic Tasarımında Dikkat Edilmesi Gerekenler
&lt;/h2&gt;

&lt;p&gt;Kafka üzerinde EDA tasarlarken topic isimlendirme, partition stratejisi ve sahiplik modeli en kritik kararlardandır.&lt;/p&gt;

&lt;p&gt;Örnek topic naming standardı:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;domain&amp;gt;.&amp;lt;entity&amp;gt;.&amp;lt;event&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Örnekler:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;payment.transaction.completed
customer.profile.updated
machine.temperature.exceeded
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bazı kurumlar stage bilgisini de topic adına eklemeyi tercih eder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw.payment.transaction.created
validated.payment.transaction.created
enriched.payment.transaction.created
curated.payment.transaction.completed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Burada önemli olan tek bir doğru isimlendirme standardı değil, organizasyon genelinde tutarlı bir standardın olmasıdır.&lt;/p&gt;

&lt;p&gt;İyi bir topic ismi şu sorulara cevap verebilmelidir:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hangi domain’e ait?&lt;/li&gt;
&lt;li&gt;Hangi entity veya iş nesnesini temsil ediyor?&lt;/li&gt;
&lt;li&gt;Hangi event’i taşıyor?&lt;/li&gt;
&lt;li&gt;Bu topic’in sahibi hangi ekip?&lt;/li&gt;
&lt;li&gt;Bu topic kalıcı bir contract mı, yoksa geçici bir processing topic’i mi?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Partition Key Seçimi
&lt;/h2&gt;

&lt;p&gt;Kafka’da partition key seçimi hem performansı hem de sıralama garantisini etkiler.&lt;/p&gt;

&lt;p&gt;Örneğin ödeme işlemlerinde aynı müşteriye ait event’lerin sıralı işlenmesi gerekiyorsa key olarak customer_id seçilebilir.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Topic: payment.transaction
Key: customer_id
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Aynı karta ait işlemler sıralı işlenmek isteniyorsa card_id daha doğru olabilir.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Topic: card.transaction
Key: card_id
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yanlış key seçimi bazı partition’ların aşırı yüklenmesine, bazı partition’ların ise boş kalmasına neden olabilir. Bu da hot partition problemine yol açar.&lt;/p&gt;

&lt;p&gt;Partition key seçerken şu sorular sorulmalıdır:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hangi seviyede sıralama garantisine ihtiyacımız var?&lt;/li&gt;
&lt;li&gt;Hangi key dağılımı daha dengeli sağlar?&lt;/li&gt;
&lt;li&gt;Consumer paralelliği nasıl ölçeklenecek?&lt;/li&gt;
&lt;li&gt;Aynı business entity’ye ait event’ler aynı partition’da mı kalmalı?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Schema Yönetimi
&lt;/h2&gt;

&lt;p&gt;EDA’da event contract çok önemlidir. Çünkü producer ve consumer doğrudan birbirini tanımasa bile schema üzerinden anlaşır.&lt;/p&gt;

&lt;p&gt;Bu nedenle her event tipi için net bir schema yönetimi olmalıdır.&lt;/p&gt;

&lt;p&gt;Dikkat edilmesi gerekenler:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Event schema versiyonlanmalı.&lt;/li&gt;
&lt;li&gt;Geriye uyumluluk kuralları tanımlanmalı.&lt;/li&gt;
&lt;li&gt;Zorunlu ve opsiyonel alanlar net olmalı.&lt;/li&gt;
&lt;li&gt;Event timestamp, event_id, source_system gibi metadata alanları standartlaştırılmalı.&lt;/li&gt;
&lt;li&gt;Breaking change yapılacaksa yeni versiyon veya yeni topic stratejisi belirlenmeli.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Örnek metadata alanları:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"event_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"evt-12345"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"event_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"PaymentCompleted"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"event_version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"event_time"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-05-13T10:15:00Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"source_system"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"payment-service"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"correlation_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"corr-98765"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Schema yönetimi ihmal edilirse Kafka topic’leri zamanla güvenilir event contract’ları olmaktan çıkar ve “kim ne yazıyor, kim nasıl okuyor” sorusunun cevabı belirsizleşir.&lt;/p&gt;

&lt;h2&gt;
  
  
  Producer ve Consumer İlişkisi
&lt;/h2&gt;

&lt;p&gt;EDA’nın en önemli avantajlarından biri producer ve consumer arasındaki gevşek bağlılıktır.&lt;/p&gt;

&lt;p&gt;Producer uygulama, event’i yayınlar. Bu event’i kaç consumer’ın okuyacağını bilmek zorunda değildir.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;payment.transaction.completed
        |
        +--&amp;gt; fraud-service
        +--&amp;gt; notification-service
        +--&amp;gt; data-lake-ingestion
        +--&amp;gt; realtime-dashboard
        +--&amp;gt; audit-service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bu model yeni kullanım senaryolarının mevcut producer uygulamayı değiştirmeden eklenmesine olanak sağlar. Ancak bu özgürlük, topic sahipliği ve schema contract net değilse hızla kontrolsüz tüketici bağımlılığına dönüşebilir.&lt;/p&gt;

&lt;p&gt;Bu yüzden her kritik topic için şu bilgiler net olmalıdır:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Topic owner kim?&lt;/li&gt;
&lt;li&gt;Producer uygulama hangisi?&lt;/li&gt;
&lt;li&gt;Desteklenen schema versiyonları neler?&lt;/li&gt;
&lt;li&gt;Kimler tüketebilir?&lt;/li&gt;
&lt;li&gt;Retention politikası nedir?&lt;/li&gt;
&lt;li&gt;Breaking change süreci nasıl yönetilir?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  EDA’da Sık Yapılan Tasarım Hataları
&lt;/h2&gt;

&lt;p&gt;EDA projelerinin başarısız olmasının nedeni genellikle Kafka’nın yetersizliği değil, mimari kararların net olmamasıdır.&lt;/p&gt;

&lt;p&gt;Sık yapılan hatalar şunlardır:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Her ihtiyaç için kontrolsüz topic açmak.&lt;/li&gt;
&lt;li&gt;Event ile command kavramlarını karıştırmak.&lt;/li&gt;
&lt;li&gt;Topic sahipliğini tanımlamamak.&lt;/li&gt;
&lt;li&gt;Schema yönetimini ihmal etmek.&lt;/li&gt;
&lt;li&gt;Partition key’i rastgele seçmek.&lt;/li&gt;
&lt;li&gt;Retention politikasını iş ihtiyacına göre belirlememek.&lt;/li&gt;
&lt;li&gt;Producer ve consumer contract’larını dokümante etmemek.&lt;/li&gt;
&lt;li&gt;Business event state ile data pipeline stage kavramlarını karıştırmak.&lt;/li&gt;
&lt;li&gt;Monitoring, security ve governance gereksinimlerini sonradan düşünmek.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Sonuç
&lt;/h2&gt;

&lt;p&gt;Event Driven Architecture, gerçek zamanlı veri akışları ve analitik ihtiyaçları için güçlü bir mimari yaklaşımdır. Ancak EDA’nın başarısı Kafka cluster kurmakla değil, doğru event modelini tasarlamakla başlar.&lt;/p&gt;

&lt;p&gt;İyi bir EDA tasarımı için şu soruların cevabı net olmalıdır:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hangi event’ler üretilecek?&lt;/li&gt;
&lt;li&gt;Event ile command ayrımı nasıl yapılacak?&lt;/li&gt;
&lt;li&gt;Topic/channel standardı nasıl olacak?&lt;/li&gt;
&lt;li&gt;Topic sahipliği kimde olacak?&lt;/li&gt;
&lt;li&gt;Schema nasıl yönetilecek?&lt;/li&gt;
&lt;li&gt;Partition key nasıl seçilecek?&lt;/li&gt;
&lt;li&gt;Producer ve consumer contract’ları nasıl korunacak?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bu yazıda EDA’nın temelini oluşturan event modelleme, Kafka topic/channel tasarımı, schema contract ve producer-consumer ilişkisini ele aldık. Bir sonraki yazıda ise bu event’lerin platform içinde nasıl olgunlaştığını; raw, validated, enriched ve curated akışlarını, DLQ ve alert topic’lerini, replay stratejisini, monitoring’i ve modern lakehouse mimarilerindeki Medallion yaklaşımıyla ilişkisini inceleyeceğiz.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;English version of this article is also available on my profile.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>kafka</category>
      <category>streaming</category>
      <category>dataengineering</category>
      <category>turkish</category>
    </item>
    <item>
      <title>Part 1 - Event Driven Architecture (EDA) with Kafka: Designing Events and Channels the Right Way</title>
      <dc:creator>Tayfun Yalcinkaya</dc:creator>
      <pubDate>Wed, 13 May 2026 15:53:37 +0000</pubDate>
      <link>https://dev.to/tayfun_yalcinkaya_9c29444/event-driven-architecture-eda-with-kafka-designing-events-and-channels-the-right-way-42n0</link>
      <guid>https://dev.to/tayfun_yalcinkaya_9c29444/event-driven-architecture-eda-with-kafka-designing-events-and-channels-the-right-way-42n0</guid>
      <description>&lt;p&gt;Enterprise organizations around the world are moving away from relying only on batch analytics that run hours or days after an event has happened. Instead, they are adopting architectures that can react when events occur. In areas such as fraud detection, real-time customer experience, IoT monitoring, payment systems, operational dashboards, and security analytics, Event Driven Architecture is no longer only a modern integration pattern. It has become one of the key building blocks of real-time data platforms.&lt;/p&gt;

&lt;p&gt;The reason is simple: in many organizations, chronic batch analytics problems are not only technology problems; they are timing problems. Data is collected, moved, processed, and reported. But by the time the business receives the result, the decision may already be late. When EDA is designed correctly, it reduces this delay. It allows data to be processed as events happen, providing lower latency, faster action, and a more flexible integration model.&lt;/p&gt;

&lt;p&gt;At this point, it is more accurate to position EDA not as a direct replacement for batch processing, but as a different architectural response that complements it. Large historical data processing, periodic reporting, financial closing, and heavy bulk transformations are still strong areas for batch processing. EDA creates the most value when data is continuously flowing, decisions must be made quickly, and systems are expected to react to events almost immediately.&lt;/p&gt;

&lt;p&gt;However, poorly designed Event Driven Architecture can turn streaming flows and real-time analytics into a serious mess inside data management platforms. At the beginning, a decision like “let’s create Kafka topics and let systems write there” may look simple. A few months later, it may turn into uncontrolled topic growth, unclear event ownership, unreliable data distribution, consumer dependency problems, reprocessing issues, and data flows that are difficult to trace.&lt;/p&gt;

&lt;p&gt;This blog series is built around two main questions: How should we design an event, and how should an event mature inside the platform? In this first article, we will focus on the event itself: the difference between events and commands, the Kafka topic/channel model, schema contracts, partition keys, producer-consumer relationships, and common design mistakes. In the second article, we will look at the event lifecycle inside the platform: the pipeline from raw to curated events, DLQ (Dead Letter Queue : It is the channel where failed or unprocessable events are sent) and alert topics, replay, monitoring, governance, and the relationship with the Medallion approach used in modern lakehouse architectures.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Event Driven Architecture?
&lt;/h2&gt;

&lt;p&gt;Event Driven Architecture is an architectural approach where systems communicate through events instead of direct and synchronous calls.&lt;/p&gt;

&lt;p&gt;An event represents a meaningful business fact that has already happened in the system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A customer was created.&lt;/li&gt;
&lt;li&gt;A payment was completed.&lt;/li&gt;
&lt;li&gt;A card transaction failed.&lt;/li&gt;
&lt;li&gt;Stock level dropped below a critical threshold.&lt;/li&gt;
&lt;li&gt;A sensor temperature exceeded the limit.&lt;/li&gt;
&lt;li&gt;A user logged in to a mobile application.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The important point is this: an event is not a request. It is information about something that has already happened.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PaymentCompleted
CustomerCreated
OrderShipped
MachineTemperatureExceeded
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are events because they describe something that happened in the past.&lt;/p&gt;

&lt;p&gt;On the other hand:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CreatePayment
UpdateCustomer
SendNotification
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are closer to commands. They express an intention to make a system do something. In EDA design, separating events from commands is a critical decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Difference Between Traditional Integration and EDA
&lt;/h2&gt;

&lt;p&gt;In traditional architectures, systems usually call each other directly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application A ---&amp;gt; Application B ---&amp;gt; Application C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This model looks simple at a small scale. However, as the number of systems increases, dependencies grow. If one service becomes slow, fails, or changes, the other systems in the chain may also be affected.&lt;/p&gt;

&lt;p&gt;In EDA, systems do not directly depend on each other. Instead, they publish events, and the systems interested in those events consume them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application A ---&amp;gt; Event Channel ---&amp;gt; Application B
                               |----&amp;gt; Application C
                               |----&amp;gt; Application D
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this model, the producer system does not need to know who will consume the event. A new consumer can be added without changing the existing producer application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Does Kafka Fit in EDA?
&lt;/h2&gt;

&lt;p&gt;In EDA architectures, Kafka is usually positioned as an event backbone, event bus, or event streaming platform.&lt;/p&gt;

&lt;p&gt;The core Kafka concepts are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Producer: The application that produces events.&lt;/li&gt;
&lt;li&gt;Topic: The logical channel where events are written.&lt;/li&gt;
&lt;li&gt;Partition: The unit that enables parallel processing within a topic.&lt;/li&gt;
&lt;li&gt;Consumer: The application that reads events.&lt;/li&gt;
&lt;li&gt;Consumer Group: A group of consumers that share the same work.&lt;/li&gt;
&lt;li&gt;Broker: A server inside the Kafka cluster.&lt;/li&gt;
&lt;li&gt;Offset: The position that shows how far a consumer has read in a topic.&lt;/li&gt;
&lt;li&gt;Retention: The policy that defines how long events stay in Kafka.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A simple Kafka-based EDA flow can be shown like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Source System
     |
     v
Kafka Topic / Event Channel
     |
     +--&amp;gt; Real-time Analytics
     +--&amp;gt; Notification Service
     +--&amp;gt; Data Lake Ingestion
     +--&amp;gt; Fraud Detection
     +--&amp;gt; Monitoring Dashboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, Kafka topics act as event channels between systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does Channel-Based Kafka Design Mean?
&lt;/h2&gt;

&lt;p&gt;A channel-based structure usually means separating event types or business domains through Kafka topics.&lt;/p&gt;

&lt;p&gt;For example, for a payment system:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;payment.transaction.created
payment.transaction.authorized
payment.transaction.completed
payment.transaction.failed
payment.transaction.reversed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a customer domain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;customer.created
customer.updated
customer.segment.changed
customer.status.changed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For an IoT or manufacturing scenario:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;machine.telemetry.raw
machine.telemetry.enriched
machine.alert.temperature
machine.maintenance.predicted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each topic is an event channel. The producer application writes events to the related channel. Consumer applications read the channels they are interested in and perform their own work.&lt;/p&gt;

&lt;h2&gt;
  
  
  An Anonymized Field Example: Channel-Based Design for Energy Distribution Data
&lt;/h2&gt;

&lt;p&gt;The following example is anonymized from a large-scale data platform project in the energy distribution domain. Without sharing the organization or project name, it aims to make the real architectural needs and EDA design decisions from the field more visible.&lt;/p&gt;

&lt;p&gt;In this scenario, the main need was to centrally collect, securely transport, process, and analyze data coming from smart meters and lighting infrastructure across the country. At first glance, this may look like an integration project. However, when we consider the data volume, the number of source systems, the need for 24/7 operation, security expectations, and operational monitoring requirements, the problem becomes much bigger than classical integration. A real-time and always-on data flow architecture was needed.&lt;/p&gt;

&lt;p&gt;One of the most critical decisions in the field was Kafka topic design. Different types of meter data were coming from multiple distribution companies: electricity consumption data, meter activity data, online/offline status information, and operational signals. Writing all data into one large topic could look simpler at first. But this would create serious complexity for consumers in terms of filtering, scaling, error handling, and monitoring.&lt;/p&gt;

&lt;p&gt;For this reason, a source-based and data-type-based channel approach was preferred. Dozens of Kafka topics were designed based on distribution company and data type. This allowed each flow to be monitored separately, consumed separately, and scaled independently when needed.&lt;/p&gt;

&lt;p&gt;This logic can be represented as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw.energy.meter.reading.&amp;lt;source&amp;gt;
raw.energy.meter.status.&amp;lt;source&amp;gt;
raw.energy.lighting.consumption.&amp;lt;source&amp;gt;
raw.energy.device.activity.&amp;lt;source&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this design, Kafka was not only a messaging layer. It became the central event backbone that separated high-volume data from different sources into organized channels. As a result, real-time monitoring services, consumers writing to operational databases, archiving processes, and analytics platforms could all be fed independently from the same data flow.&lt;/p&gt;

&lt;p&gt;The main lesson from this example is clear: in channel-based Kafka design, a growing number of topics is not a problem by itself. The real problem starts when it is not clear which domain, data type, ownership model, and consumption purpose each topic serves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Event or Command?
&lt;/h2&gt;

&lt;p&gt;One of the common mistakes in EDA design is mixing events and commands.&lt;/p&gt;

&lt;p&gt;An event represents a business fact that has already happened:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PaymentCompleted
CustomerCreated
OrderShipped
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A command represents an action that we want a system to perform:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CreatePayment
UpdateCustomer
SendNotification
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Commands can also be carried over Kafka. However, this makes topics such as timeout, retry, correlation, response handling, and idempotency more complex. For this reason, in Kafka-based EDA design, it is usually healthier to start by modeling things that have already happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  Business Event State and Data Pipeline Stage Should Not Be Mixed
&lt;/h2&gt;

&lt;p&gt;Another important distinction in EDA design is the difference between business state and data processing stage.&lt;/p&gt;

&lt;p&gt;A business event lifecycle may look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PaymentInitiated -&amp;gt; PaymentAuthorized -&amp;gt; PaymentCompleted -&amp;gt; PaymentSettled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A data pipeline stage may look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw -&amp;gt; validated -&amp;gt; enriched -&amp;gt; curated
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first one describes the state changes of a business process. The second one describes the maturity of data inside the platform. Separating these two concepts is very important for correct topic design.&lt;/p&gt;

&lt;p&gt;In the first article, we focus more on business events and channel design. In the second article, we will explain data pipeline stages such as raw, validated, enriched, and curated in more detail.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to Consider in Topic Design
&lt;/h2&gt;

&lt;p&gt;When designing EDA on Kafka, topic naming, partition strategy, and ownership are among the most critical decisions.&lt;/p&gt;

&lt;p&gt;An example topic naming standard can be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;domain&amp;gt;.&amp;lt;entity&amp;gt;.&amp;lt;event&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Examples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;payment.transaction.completed
customer.profile.updated
machine.temperature.exceeded
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Some organizations also prefer to include the stage information in the topic name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw.payment.transaction.created
validated.payment.transaction.created
enriched.payment.transaction.created
curated.payment.transaction.completed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important point is not that there is only one correct naming standard. The important point is having a consistent standard across the organization.&lt;/p&gt;

&lt;p&gt;A good topic name should answer these questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which domain does it belong to?&lt;/li&gt;
&lt;li&gt;Which entity or business object does it represent?&lt;/li&gt;
&lt;li&gt;Which event does it carry?&lt;/li&gt;
&lt;li&gt;Which team owns this topic?&lt;/li&gt;
&lt;li&gt;Is this topic a stable contract, or is it a temporary processing topic?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Partition Key Selection
&lt;/h2&gt;

&lt;p&gt;In Kafka, partition key selection affects both performance and ordering guarantees.&lt;/p&gt;

&lt;p&gt;For example, if events related to the same customer must be processed in order, customer_id can be selected as the key.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Topic: payment.transaction
Key: customer_id
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If transactions related to the same card must be processed in order, card_id may be a better choice.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Topic: card.transaction
Key: card_id
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A poor key choice can overload some partitions while leaving others almost empty. This causes a hot partition problem.&lt;/p&gt;

&lt;p&gt;When selecting a partition key, these questions should be asked:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What level of ordering do we need?&lt;/li&gt;
&lt;li&gt;Which key provides a more balanced distribution?&lt;/li&gt;
&lt;li&gt;How will consumer parallelism scale?&lt;/li&gt;
&lt;li&gt;Should events related to the same business entity stay in the same partition?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Schema Management
&lt;/h2&gt;

&lt;p&gt;In EDA, the event contract is very important. Even if producers and consumers do not know each other directly, they agree through the schema.&lt;/p&gt;

&lt;p&gt;For this reason, each event type should have a clear schema management approach.&lt;/p&gt;

&lt;p&gt;Key points to consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Event schemas should be versioned.&lt;/li&gt;
&lt;li&gt;Backward compatibility rules should be defined.&lt;/li&gt;
&lt;li&gt;Required and optional fields should be clear.&lt;/li&gt;
&lt;li&gt;Metadata fields such as event timestamp, event_id, and source_system should be standardized.&lt;/li&gt;
&lt;li&gt;If a breaking change is needed, a new version or a new topic strategy should be defined.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example metadata fields:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"event_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"evt-12345"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"event_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"PaymentCompleted"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"event_version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"event_time"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-05-13T10:15:00Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"source_system"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"payment-service"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"correlation_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"corr-98765"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If schema management is ignored, Kafka topics slowly stop being reliable event contracts. Then the answer to “who writes what and who reads it how?” becomes unclear.&lt;/p&gt;

&lt;h2&gt;
  
  
  Producer and Consumer Relationship
&lt;/h2&gt;

&lt;p&gt;One of the most important advantages of EDA is loose coupling between producers and consumers.&lt;/p&gt;

&lt;p&gt;The producer application publishes the event. It does not need to know how many consumers will read it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;payment.transaction.completed
        |
        +--&amp;gt; fraud-service
        +--&amp;gt; notification-service
        +--&amp;gt; data-lake-ingestion
        +--&amp;gt; realtime-dashboard
        +--&amp;gt; audit-service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This model allows new use cases to be added without changing the existing producer application. However, this flexibility can quickly turn into uncontrolled consumer dependency if topic ownership and schema contracts are not clear.&lt;/p&gt;

&lt;p&gt;For every critical topic, the following information should be clear:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who owns the topic?&lt;/li&gt;
&lt;li&gt;Which application is the producer?&lt;/li&gt;
&lt;li&gt;Which schema versions are supported?&lt;/li&gt;
&lt;li&gt;Who is allowed to consume it?&lt;/li&gt;
&lt;li&gt;What is the retention policy?&lt;/li&gt;
&lt;li&gt;How are breaking changes managed?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Common EDA Design Mistakes
&lt;/h2&gt;

&lt;p&gt;EDA projects usually fail not because Kafka is weak, but because architectural decisions are not clear enough.&lt;/p&gt;

&lt;p&gt;Common mistakes include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating topics for every need without control.&lt;/li&gt;
&lt;li&gt;Mixing events and commands.&lt;/li&gt;
&lt;li&gt;Not defining topic ownership.&lt;/li&gt;
&lt;li&gt;Ignoring schema management.&lt;/li&gt;
&lt;li&gt;Choosing partition keys randomly.&lt;/li&gt;
&lt;li&gt;Defining retention without business requirements.&lt;/li&gt;
&lt;li&gt;Not documenting producer and consumer contracts.&lt;/li&gt;
&lt;li&gt;Mixing business event state with data pipeline stages.&lt;/li&gt;
&lt;li&gt;Thinking about monitoring, security, and governance too late.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Event Driven Architecture is a powerful approach for real-time data flows and analytics needs. However, the success of EDA does not start with installing a Kafka cluster. It starts with designing the right event model.&lt;/p&gt;

&lt;p&gt;A good EDA design should clearly answer these questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which events will be produced?&lt;/li&gt;
&lt;li&gt;How will we separate events from commands?&lt;/li&gt;
&lt;li&gt;What will the topic/channel standard be?&lt;/li&gt;
&lt;li&gt;Who will own each topic?&lt;/li&gt;
&lt;li&gt;How will schemas be managed?&lt;/li&gt;
&lt;li&gt;How will partition keys be selected?&lt;/li&gt;
&lt;li&gt;How will producer and consumer contracts be protected?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this article, we covered event modeling, Kafka topic/channel design, schema contracts, and producer-consumer relationships. In the next article, we will look at how these events mature inside the platform: raw, validated, enriched, and curated flows, DLQ and alert topics, replay strategy, monitoring, and the relationship with the Medallion approach used in modern lakehouse architectures.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Turkish version of this article is also available on my profile.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>kafka</category>
      <category>architecture</category>
      <category>streaming</category>
      <category>dataengineering</category>
    </item>
    <item>
      <title>Why Apache Ozone is the Preferred Object Store for Big Data</title>
      <dc:creator>Tayfun Yalcinkaya</dc:creator>
      <pubDate>Mon, 05 Jan 2026 21:42:00 +0000</pubDate>
      <link>https://dev.to/tayfun_yalcinkaya_9c29444/why-apache-ozone-is-the-preferred-object-store-for-big-data-4khh</link>
      <guid>https://dev.to/tayfun_yalcinkaya_9c29444/why-apache-ozone-is-the-preferred-object-store-for-big-data-4khh</guid>
      <description>&lt;p&gt;The limitations of traditional HDFS architecture when facing billions of small files, combined with the search for S3-like flexibility in on-premise environments, drive us toward a modern solution: Apache Ozone.&lt;/p&gt;

&lt;p&gt;From a technology perspective, the abundance of products and methods available for data storage requires serious expertise to navigate. If you need to store a wide variety of data, standard RDBMS technologies will eventually fall short. You need to turn to independent, cost-effective, yet efficient storage technologies that allow you to query data performantly regardless of its type.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Shift to On-Premise Object Storage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If your data landscape includes structured, semi-structured, and unstructured data, and you aim for cost efficiency by avoiding separate silos, all paths lead to an object storage architecture, implemented through an on-premise object store. For organizations with requirements to keep data in-house, on-premise solutions are a necessity.&lt;/p&gt;

&lt;p&gt;Unlike traditional object storage systems that prioritize API compatibility, Apache Ozone is designed as a storage system optimized for analytical engines rather than object semantics alone.&lt;/p&gt;

&lt;p&gt;While the market offers several options like MinIO or Ceph , if you are utilizing big data engines such as Hive, Spark, Trino, or Impala, there is a particularly optimized solution: Apache Ozone.&lt;/p&gt;

&lt;p&gt;(You can explore the technical architecture of Apache Ozone &lt;a href="https://ozone.apache.org/docs/edge/" rel="noopener noreferrer"&gt;here&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Technical Advantages of Apache Ozone&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjdijk5pyoda8fkh9qiiy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjdijk5pyoda8fkh9qiiy.jpg" alt="Apache Ozone Architecture" width="800" height="666"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Source: &lt;a href="https://docs.cloudera.com/cdp-private-cloud-base/7.1.8/ozone-overview/ozone-overview.pdf" rel="noopener noreferrer"&gt;Cloudera Ozone Overview Documentation&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Strong Consistency:&lt;/strong&gt;&lt;br&gt;
Ozone is designed to provide strong consistency via the Raft consensus protocol. This ensures that data is immediately visible once written, with guaranteed atomic write support. In contrast, S3-compatible interfaces in other systems may exhibit eventual consistency, leading to potential delays or conflicts during overwrite or list operations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Native Ecosystem Integration:&lt;/strong&gt;&lt;br&gt;
Unlike basic S3-compatible stores that offer limited integration with tools like Hive and Impala, Ozone is built as a core part of the Hadoop ecosystem. This results in seamless, out-of-the-box support for major big data processing engines Hive, Spark, and Trino.For instance, you can check the detailed &lt;a href="https://ozone.apache.org/docs/edge/integration/hive.html" rel="noopener noreferrer"&gt;Hive Integration Documentation&lt;/a&gt; to see the level of optimization.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;POSIX Compatibility &amp;amp; File System Behavior:&lt;/strong&gt;&lt;br&gt;
Through its OFS layer, Ozone offers POSIX-like behavior and a directory hierarchy. This allows for native atomic renames, which are crucial for the performance and reliability of Hadoop-based workloads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Full Kerberos Support:&lt;/strong&gt;&lt;br&gt;
Leveraging its native Hadoop compatibility, Ozone offers full integration with Kerberos for enterprise-grade security , a feature often lacking in S3-only object stores.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Apache Ozone&lt;/th&gt;
&lt;th&gt;S3 (MinIO, Ceph, etc.)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Performance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Optimized for large-scale data lakes&lt;/td&gt;
&lt;td&gt;High throughput, limited metadata handling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Consistency Model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Strong Consistency&lt;/strong&gt; (Raft-based)&lt;/td&gt;
&lt;td&gt;Eventual Consistency (possible delays)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hadoop/Spark/Trino&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Native &amp;amp; Seamless Integration&lt;/td&gt;
&lt;td&gt;Limited (especially for Hive/Impala)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;POSIX / File System&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;POSIX-like (Native Atomic Rename)&lt;/td&gt;
&lt;td&gt;None (Object-based only)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Kerberos Support&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Fully Compatible (Native)&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;The Perfect Match for Modern Data Lakehouse (Apache Iceberg)&lt;/strong&gt;&lt;br&gt;
If you are moving toward a Data Lakehouse architecture using Apache Iceberg, Ozone stands out as the superior storage layer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Atomic Commits:&lt;/strong&gt;&lt;br&gt;
Iceberg relies on atomic metadata updates to prevent data corruption during concurrent writes. Ozone supports this natively through its atomic rename functionality.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Native Locking:&lt;/strong&gt;&lt;br&gt;
It supports the locking mechanisms necessary to prevent metadata inconsistencies , whereas S3-compatible stores often require external services like Zookeeper to manage locks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Snapshot Isolation:&lt;/strong&gt;&lt;br&gt;
Ozone’s architecture ensures that data is not considered committed until acknowledged by all replicas, preserving the consistent view that Iceberg’s immutable file model requires.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Apache Ozone&lt;/th&gt;
&lt;th&gt;S3-compatible Object Stores&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Atomic Commits&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Fully Supported&lt;/strong&gt; (via OFS)&lt;/td&gt;
&lt;td&gt;No native support (workarounds required)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Locking Mechanism&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Native Support&lt;/td&gt;
&lt;td&gt;Requires external tools (Zookeeper, etc.)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Snapshot Isolation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Guaranteed (Strong Consistency)&lt;/td&gt;
&lt;td&gt;Very limited / Eventual consistency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Directory Structure&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Native Support&lt;/td&gt;
&lt;td&gt;Simulated (Prefix-based)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
For organizations aiming to process unstructured and structured data effectively using Spark, Hive, or Trino. Apache Ozone is not just an alternative. It is a purpose-built on-premise object store for big data workloads. It bridges the gap between traditional file systems and modern object storage, making it the ideal choice for high-performance data lakehouse architectures.&lt;/p&gt;

&lt;p&gt;What is your preferred storage layer for on-premise big data projects? How could Ozone’s advantages resolve bottlenecks in your current architecture?&lt;/p&gt;




&lt;p&gt;Written by &lt;strong&gt;Tayfun Yalçınkaya&lt;/strong&gt;, working on large-scale Big Data platforms and Lakehouse architectures.&lt;br&gt;
Connect with me on &lt;a href="https://www.linkedin.com/in/tayfun-yalcinkaya/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dataengineering</category>
      <category>bigdata</category>
      <category>datalakehouse</category>
      <category>apacheozone</category>
    </item>
  </channel>
</rss>
