<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kaio on Medium]]></title>
        <description><![CDATA[Stories by Kaio on Medium]]></description>
        <link>https://medium.com/@kaieras?source=rss-2d14ffadc533------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*vPb5nWDLAth1gaDUqfxjYA.png</url>
            <title>Stories by Kaio on Medium</title>
            <link>https://medium.com/@kaieras?source=rss-2d14ffadc533------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 05:35:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kaieras/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[I Built a Real-Time AI Fraud Detection Agent in Confluent Cloud Using Only a Browser]]></title>
            <link>https://medium.com/@kaieras/i-built-a-real-time-ai-fraud-detection-agent-in-confluent-cloud-using-only-a-browser-cf3b4237958d?source=rss-2d14ffadc533------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf3b4237958d</guid>
            <dc:creator><![CDATA[Kaio]]></dc:creator>
            <pubDate>Sun, 14 Jun 2026 23:07:13 GMT</pubDate>
            <atom:updated>2026-06-15T21:05:47.001Z</atom:updated>
            <content:encoded><![CDATA[<h3>No Terminal. No Code. Just SQL and Clicks.</h3><p>I’ve been studying stream processing pipelines for years. Most of the time, that means opening a terminal, writing YAML, pushing containers, and spending the first two hours just getting the infrastructure to talk to itself.</p><p>So when I sat down to build an AI fraud detection agent on Confluent Cloud entirely through the browser I was genuinely surprised by how far things have come.</p><p>Here’s what I built, step by step, using only the Confluent Cloud portal: a real-time pipeline that ingests synthetic e-commerce orders, enriches them with user context, detects anomalous behavior using Flink SQL windowed aggregations, and then calls an LLM (via ML_PREDICT) to classify each anomaly and generate a natural-language decision.</p><p>Six persistent Flink jobs. Ten Kafka topics. One AI model. Zero lines of application code.</p><h3>What the Pipeline Does</h3><p>The architecture follows the <strong>ReAct pattern</strong> (Reason + Act, from NeurIPS 2022): a continuous loop where the system observes incoming events, analyzes context, reasons with a language model, and acts by writing decisions to an output topic.</p><p>The full topic topology:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JPyX_P2GWnFhpl4gQs7Xaw.png" /></figure><p>All of this runs inside Confluent Cloud. Let me walk through how to build it, one UI screen at a time.</p><h3>Step 1: Three Clicks to Get a Kafka Cluster</h3><p>The setup starts at <strong>confluent.cloud</strong>. From the home page, I created an environment called ai-agents-lab using <strong>Environments → Add cloud environment</strong>, then launched a Basic Kafka cluster inside it.</p><p>The cluster creation form has three choices: cluster type, region, and availability. For this lab: Basic tier, AWS us-east-2, Single zone. The cluster was Running in about 90 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*wyxeMJWLpnKzRq7hIXJ6Mw.png" /></figure><p>The Schema Registry is automatically provisioned alongside the environment. I didn’t touch it — it just worked, silently capturing Avro schemas from every topic the connectors created.</p><h3>Step 2: Four Connectors, Four Topics, Zero Config Files</h3><p>Instead of writing Kafka producers, I used Confluent’s built-in <strong>Datagen Source Connectors</strong> to generate synthetic but realistic streaming data. In the UI: <strong>Connectors → + Add connector → Datagen Source</strong>.</p><p>Each connector has a wizard with five steps. The only fields that matter per connector:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*guDGv5Lbgv79Vb6a2McJNg.png" /></figure><p>The ORDERS schema generates events with orderid, itemid, orderunits, and a nested address struct. USERS generates 10 distinct user profiles cycling through User_1 to User_10. RATINGS includes a message field with user feedback text — which makes for interesting AI context later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f10re0x4iezvWJZdCTI5Qw.png" /></figure><h3>Step 3: The Flink SQL Workspace — Where the Real Work Happens</h3><p>This is the centerpiece of the Confluent Cloud experience. Navigating to <strong>Flink → Open SQL workspace</strong> opens a browser-based IDE: a catalog explorer on the left, an SQL editor in the center, and a live results panel below.</p><p>The moment I landed in the workspace, I ran:</p><pre>USE CATALOG `ai-agents-lab`;<br>USE `ai-lab-cluster`;<br>SHOW TABLES;</pre><pre>+----------------+<br>| table name     |<br>+----------------+<br>| raw_orders     |<br>| raw_pageviews  |<br>| raw_ratings    |<br>| raw_users      |<br>+----------------+</pre><p>No CREATE TABLE statements. No schema definitions. The four topics created by the Datagen connectors were already available as Flink tables, with Avro schemas automatically resolved from Schema Registry. I ran SELECT * FROM raw_orders LIMIT 10 and got results immediately.</p><h3>Step 4: Building the Processing Pipeline in the Workspace</h3><p>Every processing job is an INSERT INTO ... SELECT statement submitted from the SQL editor. Once submitted, it becomes a persistent background job that runs until explicitly stopped.</p><h3>Enrichment: Stream-Table JOIN</h3><p>The ORDERS schema doesn&#39;t include userid directly. I simulated the relationship using MOD(orderid, 10) + 1 to map each order to one of the 10 users. First I created a compacted user lookup table:</p><pre>CREATE TABLE `latest_users` (<br>  `userid` STRING NOT NULL,<br>  `regionid` STRING,<br>  `gender` STRING,<br>  `registertime` TIMESTAMP(3),<br>  PRIMARY KEY (`userid`) NOT ENFORCED<br>) WITH (<br>  &#39;changelog.mode&#39; = &#39;upsert&#39;,<br>  &#39;kafka.cleanup-policy&#39; = &#39;compact&#39;<br>);<br><br>INSERT INTO `latest_users`<br>SELECT<br>  userid,<br>  regionid,<br>  gender,<br>  CAST(TO_TIMESTAMP_LTZ(registertime, 3) AS TIMESTAMP(3))<br>FROM `raw_users`;</pre><p>Then the enrichment job:</p><pre>INSERT INTO `enriched_orders`<br>SELECT<br>  o.orderid,<br>  CAST(TO_TIMESTAMP_LTZ(o.ordertime, 3) AS TIMESTAMP(3))  AS ordertime,<br>  o.itemid,<br>  o.orderunits,<br>  ROUND(o.orderunits * (MOD(o.orderid, 50) + 10.0), 2)    AS order_value,<br>  o.address.city                                           AS city,<br>  o.address.state                                          AS state,<br>  CONCAT(&#39;User_&#39;, CAST(MOD(o.orderid, 10) + 1 AS STRING)) AS userid,<br>  COALESCE(u.regionid, &#39;UNKNOWN&#39;)                          AS regionid,<br>  COALESCE(u.gender,   &#39;UNKNOWN&#39;)                          AS gender<br>FROM `raw_orders` o<br>LEFT JOIN `latest_users` u<br>  ON CONCAT(&#39;User_&#39;, CAST(MOD(o.orderid, 10) + 1 AS STRING)) = u.userid;</pre><p>I ran SELECT * FROM enriched_orders LIMIT 10 and saw rows with userid, regionid, gender, and order_value all filled in. The join was working.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qhSg_FJ0KDmHkDLgPLvUNw.png" /></figure><p>After two minutes, querying order_metrics showed per-user aggregates per window. A user with order_count = 8 and total_value = $843 in a single minute stood out immediately — exactly the kind of signal the AI agent needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1phvfqPNiM4ug1oONzdNEA.png" /></figure><h3>Anomaly Detection: Threshold Filtering with Context</h3><pre>INSERT INTO `anomaly_candidates`<br>SELECT<br>  o.orderid,<br>  m.window_end AS detection_time,<br>  o.userid, o.itemid, o.order_value,<br>  COALESCE(m.order_count, 0)    AS order_count_1min,<br>  COALESCE(m.total_value, 0.0)  AS total_value_1min,<br>  COALESCE(m.distinct_items, 0) AS distinct_items_1min,<br>  -- Anomaly score: sum of triggered flags (0 to 3)<br>  (CASE WHEN COALESCE(m.order_count, 0) &gt; 5   THEN 1 ELSE 0 END +<br>   CASE WHEN COALESCE(m.total_value, 0) &gt; 500  THEN 1 ELSE 0 END +<br>   CASE WHEN o.order_value &gt; 200               THEN 1 ELSE 0 END) AS anomaly_score,<br>  -- Human-readable flags for the LLM prompt<br>  CONCAT_WS(&#39;; &#39;,<br>    CASE WHEN COALESCE(m.order_count, 0) &gt; 5<br>         THEN CONCAT(&#39;high_order_frequency(&#39;, CAST(COALESCE(m.order_count,0) AS STRING), &#39; orders/min)&#39;)<br>         ELSE NULL END,<br>    CASE WHEN COALESCE(m.total_value, 0) &gt; 500<br>         THEN CONCAT(&#39;high_total_spend($&#39;, CAST(ROUND(COALESCE(m.total_value,0), 0) AS STRING), &#39;/min)&#39;)<br>         ELSE NULL END,<br>    CASE WHEN o.order_value &gt; 200<br>         THEN CONCAT(&#39;high_single_order($&#39;, CAST(ROUND(o.order_value, 0) AS STRING), &#39;)&#39;)<br>         ELSE NULL END<br>  ) AS anomaly_reasons<br>FROM `enriched_orders` o<br>LEFT JOIN `order_metrics` m<br>  ON o.userid = m.userid AND o.ordertime BETWEEN m.window_start AND m.window_end<br>WHERE COALESCE(m.order_count,0) &gt; 5<br>   OR COALESCE(m.total_value,0) &gt; 500<br>   OR o.order_value &gt; 200;</pre><p>At this point, three persistent Flink jobs were running in the background. I checked <strong>Flink → Statements</strong> and saw them all with green Running badges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qtfZu4oez2ZhA44zvgCp3Q.png" /></figure><h3>Step 5: Wiring Up the AI — Model Connection and ML_PREDICT</h3><p>This is where Confluent Cloud goes beyond traditional stream processors. In <strong>Flink → Connections</strong>, I created a model connection pointing to OpenAI:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-NtL5kkubNgGLagjJ7T2WQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5fjUbbFcqgH-u1QnhsUL0Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*h5MfCJhXUUqVESQZVirOAA.png" /></figure><p>After clicking <strong>Test connection</strong> and seeing Connection successful, I hit <strong>Create</strong>. Back in the SQL workspace, I registered the model.</p><pre>CREATE MODEL `order_risk_classifier`<br>INPUT  (`context_prompt` STRING)<br>OUTPUT (`risk_assessment` STRING)<br>WITH (<br>  &#39;provider&#39;             = &#39;openai&#39;,<br>  &#39;task&#39;                 = &#39;text_generation&#39;,<br>  &#39;openai.connection&#39;    = &#39;openai-lab-connection&#39;,<br>  &#39;openai.model_version&#39; = &#39;gpt-4o-mini&#39;,<br>  &#39;openai.system_prompt&#39; = &#39;You are a fraud detection expert. Respond ONLY with valid JSON: {&quot;risk_level&quot;: &quot;LOW|MEDIUM|HIGH&quot;, &quot;confidence&quot;: 0.0-1.0, &quot;action&quot;: &quot;auto_approve|flag_for_review|block_and_alert&quot;, &quot;reasoning&quot;: &quot;one sentence&quot;, &quot;suggested_limit&quot;: &quot;$amount or null&quot;}. No text outside the JSON.&#39;<br>);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WRt1MfPZggO1XQ02znLgdw.png" /></figure><p>I tested it immediately with a one-liner:</p><pre>SELECT risk_assessment<br>FROM (VALUES (&#39;User_7 placed 9 orders in 1 minute, $843 total. Flags: high_frequency(9/min); high_spend($843).&#39;))<br>  AS t(context_prompt),<br>LATERAL TABLE(ML_PREDICT(&#39;order_risk_classifier&#39;, context_prompt));</pre><p>The response came back in about 300ms:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FgVKSqxP_zfw9kIUqYGsFg.png" /></figure><h3>Why an LLM?</h3><p>One question that naturally comes up is: why involve an LLM at all?</p><p>The answer is that the LLM is not responsible for detecting anomalies. Flink already does that extremely well.</p><p>The anomaly detection logic in this pipeline is entirely deterministic. Using windowed aggregations and simple business rules, Flink identifies patterns such as unusually high order frequency, elevated spending within a short period of time, or large individual purchases. These signals are fast, explainable, and inexpensive to compute at scale.</p><p>The role of the LLM begins only after an anomaly has already been detected.</p><p>Instead of asking the model to find suspicious behavior in millions of events, we use Flink as a high-throughput filtering layer and send only a small subset of relevant cases to the model. The LLM receives structured context about the event and is responsible for interpreting the anomaly, assessing risk, and recommending an action.</p><p>In other words:</p><p><strong>Flink detects. The LLM interprets.</strong></p><p>For example, two anomalies may receive the same anomaly score, but the surrounding context can lead to different operational decisions. A customer placing several medium-value orders in a short period may deserve manual review, while a sudden spike in both order frequency and spending could justify immediate intervention. The LLM helps translate technical signals into business-oriented decisions.</p><h3>Why GPT-4o Mini?</h3><p>For this experiment, I chose GPT-4o Mini because it offers a practical balance between cost, latency, and reasoning quality.</p><p>The objective was not to perform deep investigative analysis. The model only needed to classify risk levels, provide a confidence score, generate a short explanation, and recommend an action. GPT-4o Mini was more than capable of handling this task while maintaining low inference costs and sub-second response times.</p><p>For higher-risk environments, such as payment authorization or market surveillance, larger models may improve reasoning quality, but they also increase both latency and operational costs.</p><h3>Cost vs. Quality</h3><p>One of the most important architectural decisions is deciding where AI should be applied.</p><p>Calling an LLM for every incoming event would be both expensive and unnecessary. In this design, Flink performs the heavy lifting by processing every event and identifying only the most relevant cases. The model is then invoked only when the anomaly score reaches a predefined threshold.</p><p>This architecture dramatically reduces inference costs while preserving the benefits of AI-assisted decision making.</p><p>The key insight is that streaming systems provide context at scale, while AI provides judgment where human-like interpretation adds value.</p><h3>Limitations and False Positives</h3><p>It’s important to recognize that the LLM is not a source of truth.</p><p>The model does not have access to historical customer behavior, account balances, chargeback history, device fingerprints, or any of the signals that would typically be used in a production-grade fraud platform.</p><p>Its assessment is based solely on the context included in the prompt.</p><p>Because of this, the model can generate false positives, false negatives, or recommendations that are operationally inappropriate. In a real-world environment, AI-generated decisions should be treated as recommendations rather than autonomous actions.</p><p>A more realistic production architecture would combine:</p><ul><li>Deterministic fraud rules</li><li>Statistical or machine learning models</li><li>Historical customer profiles</li><li>Human review workflows</li><li>LLM-generated explanations and recommendations</li></ul><p>The LLM becomes one component of the decision-making process rather than the decision maker itself.</p><p>This distinction is critical. The value of AI in streaming architectures is often not detecting anomalies, but helping humans and systems understand them more quickly.</p><h3>Step 6: The AI Agent Job — Six Lines That Change Everything</h3><p>With the model connection working, I launched the final job: for every anomaly candidate, build a contextualized prompt and call the LLM:</p><pre>INSERT INTO `agent_decisions`<br>SELECT<br>  CURRENT_TIMESTAMP AS decision_time,<br>  ac.userid, ac.orderid, ac.itemid, ac.order_value,<br>  ac.anomaly_score, ac.anomaly_reasons,<br>  COALESCE(JSON_VALUE(pred.risk_assessment, &#39;$.risk_level&#39;), &#39;UNKNOWN&#39;)       AS risk_level,<br>  COALESCE(TRY_CAST(JSON_VALUE(pred.risk_assessment, &#39;$.confidence&#39;) AS DOUBLE), 0.0) AS confidence,<br>  COALESCE(JSON_VALUE(pred.risk_assessment, &#39;$.action&#39;), &#39;manual_review&#39;)    AS action,<br>  COALESCE(JSON_VALUE(pred.risk_assessment, &#39;$.reasoning&#39;), &#39;none&#39;)           AS reasoning,<br>  JSON_VALUE(pred.risk_assessment, &#39;$.suggested_limit&#39;)                       AS suggested_limit,<br>  pred.risk_assessment                                                        AS raw_llm_response<br>FROM `anomaly_candidates` ac<br>CROSS JOIN LATERAL TABLE(<br>  ML_PREDICT(<br>    &#39;order_risk_classifier&#39;,<br>    CONCAT(<br>      &#39;Analyze this order anomaly:\n&#39;,<br>      &#39;User: &#39;,              ac.userid,                                     &#39;\n&#39;,<br>      &#39;Order Value: $&#39;,      CAST(ROUND(ac.order_value, 2) AS STRING),      &#39;\n&#39;,<br>      &#39;Orders (1 min): &#39;,    CAST(ac.order_count_1min AS STRING),           &#39;\n&#39;,<br>      &#39;Total Spend (1min):$&#39;,CAST(ROUND(ac.total_value_1min, 2) AS STRING), &#39;\n&#39;,<br>      &#39;Anomaly Score: &#39;,     CAST(ac.anomaly_score AS STRING), &#39;/3\n&#39;,<br>      &#39;Flags: &#39;,             COALESCE(ac.anomaly_reasons, &#39;none&#39;),          &#39;\n&#39;<br>    )<br>  )<br>) AS pred(risk_assessment);</pre><p>I ran a live query on agent_decisions without a LIMIT — and watched decisions stream in:</p><pre>SELECT<br>  decision_time,<br>  userid,<br>  event_id,<br>  ROUND(total_value_1min, 2) AS amount,<br>  anomaly_score AS score,<br>  risk_level,<br>  ROUND(confidence, 2) AS conf,<br>  action,<br>  LEFT(reasoning, 80) AS reasoning<br>FROM `agent_decisions`;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*knRzQf1zcegXYT5YG6rJlQ.png" /></figure><h3>The View That Ties It All Together</h3><p>After submitting all six jobs, I navigated to <strong>Stream Lineage</strong> (accessible from the cluster sidebar). Without any configuration, Confluent Cloud had built the full pipeline graph automatically.</p><p>Every topic was a node. Every Flink job was an edge. Live throughput numbers floated next to each connection. I could see raw_orders flowing at ~100 messages/second, anomaly_candidates at ~8/minute, and agent_decisions processing each one within 500ms of detection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BrgZihOrst-Xzg_4uBft4g.png" /><figcaption>lineage topic view</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UTNDhYLnQGoh6t9XTVqmfw.png" /><figcaption>full lineage view</figcaption></figure><h3>What Surprised Me</h3><p><strong>The catalog experience.</strong> The fact that Datagen connector topics immediately appear as queryable Flink tables — with correct Avro schemas already resolved — removes an entire class of setup friction. In a traditional self-managed Flink setup, this alone would take 30 minutes and three config files.</p><p><strong>The SQL workspace for live debugging.</strong> Being able to run SELECT * FROM anomaly_candidates LIMIT 20 from the same browser tab where you&#39;re writing the INSERT job, and see actual live data flowing through, makes iteration genuinely fast. You know immediately whether your join logic is producing what you expect.</p><p><strong>The latency.</strong> Each ML_PREDICT call adds about 200–400ms round-trip to the OpenAI API. For the fraud detection use case at this volume, that&#39;s fine. For a payment-in-flight scenario, you&#39;d want to either run the LLM call async or accept the latency in a pre-auth context.</p><p><strong>The cost model.</strong> At ~$0.001 per gpt-4o-mini call, if you filter to only call the LLM when anomaly_score &gt;= 2, you&#39;re looking at roughly $2–3/day for 100 anomalies/hour. The real leverage is in the Flink SQL pre-filtering — the LLM only sees the cases that matter.</p><h3>The Pipeline in Numbers</h3><p>After running for 30 minutes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*U9JKUToJFfMZrPKB0odgEA.png" /></figure><h3>Try It Yourself</h3><p>Everything you need to reproduce this is in the lab guide linked below. You’ll need a Confluent Cloud account (the free trial covers the setup), an OpenAI API key, and a browser. No terminal required.</p><blockquote>The most interesting takeaway was not the AI model itself, but how streaming architectures make it possible to provide context to AI systems in real time. The combination of event-driven architectures, stateful processing, and AI inference opens new possibilities for building intelligent decision systems.</blockquote><p>I&#39;d love to hear how others are experimenting with streaming and AI.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf3b4237958d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Real-Time Fraud Detection with Kafka: Architecture, Trade-offs, and the Organizational…]]></title>
            <link>https://medium.com/@kaieras/building-a-real-time-fraud-detection-platform-with-kafka-architecture-trade-offs-and-the-1db54c207d30?source=rss-2d14ffadc533------2</link>
            <guid isPermaLink="false">https://medium.com/p/1db54c207d30</guid>
            <category><![CDATA[kafka]]></category>
            <dc:creator><![CDATA[Kaio]]></dc:creator>
            <pubDate>Sun, 07 Jun 2026 22:32:51 GMT</pubDate>
            <atom:updated>2026-06-10T00:17:27.610Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building a Real-Time Fraud Detection with Kafka: Architecture, Trade-offs, and the Organizational Data Imperative</h3><p>Inspired by “Building Event-Driven Microservices: Leveraging Organizational Data at Scale” by Adam Bellemare — this project translates the book’s principles into a production-shaped fraud detection platform, from the Kafka pipeline to event contracts, from topology decisions to the architectural choices that determine whether the system survives contact with reality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*55ggzISzxHXy6i72XtrMUg.jpeg" /></figure><p>Right now, as you read this, tens of thousands of credit card transactions are being authorized around the world. Each one has a window of at most 300 milliseconds to be evaluated. There is no pause button. There is no “I’ll check on this later.” The decision — approve, review, or block has to happen before the payment terminal beeps.</p><p>Most fraud systems were not built for that reality. They were built for yesterday’s world: static rule sets, nightly batch models, analysts reviewing queues the following morning. They work well enough — until they don’t. Until a new attack vector emerges, until volume scales, until the regulator asks for explainability on every decision made in the last six months.</p><p>This post is about the problem that comes before the ML model, before the sophisticated feature store, before the executive dashboard: <strong>how to build the data infrastructure that makes any real-time fraud decision possible</strong>. The answer, in the end, has less to do with technology than with how you model your organization’s knowledge as a stream of events.</p><h3>The insight that reframes everything</h3><p>Adam Bellemare opens <em>Building Event-Driven Microservices</em> with a deceptively simple observation: most organizations already possess the data needed to make intelligent real-time decisions — but that data is locked inside siloed services, batch jobs, and databases that don’t communicate at the pace the business requires.</p><p>The fraud domain makes this tension almost painfully visible. A bank processing a card transaction has, somewhere in its systems, everything it needs to catch a fraudster: the cardholder’s spend history, device fingerprint, geographic pattern, risk classification, and transaction velocity across all channels. The information exists. What doesn’t exist, in most architectures, is a mechanism to assemble it in under 300 milliseconds while the authorization request hangs on the wire.</p><p>That gap — between data that exists and decisions that can’t be made in time — is precisely what event-driven architecture was designed to close. And closing it well requires treating the problem not as an infrastructure challenge, but as a <strong>domain modeling problem with infrastructure consequences</strong>.</p><p>This workshop is the artifact of working through that problem from first principles, using Bellemare’s framework as the intellectual backbone.</p><h3>The triple constraint that shapes every architectural decision</h3><p>Before committing a single byte to a topic, there is a triple constraint that must be named explicitly — because every design decision in this platform is a direct consequence of it:</p><ol><li><strong>Latency</strong> — the authorization window is non-negotiable. A fraud decision that arrives after the payment clears is not a fraud decision; it’s an incident report. Every architectural choice that adds latency must justify its existence against this budget.</li><li><strong>Accuracy</strong> — false negatives cost money. False positives cost customers and, increasingly, regulatory credibility. The two metrics are in structural tension: loosening rules to reduce false positives inflates false negatives, and vice-versa. The platform must make this tension <em>observable and tunable</em>, not hide it.</li><li><strong>Auditability</strong> — financial sector regulators do not accept “the model said so.” Every decision — approve, review, decline — must carry the <em>reasoning</em> that produced it, be reproducible months later, and be traceable to the data that existed at the moment of decision.</li></ol><p>These three constraints are not individually hard to satisfy. What makes fraud architecture genuinely difficult is that <strong>maximizing any one degrades the others</strong>, and the right equilibrium shifts as the threat landscape evolves. The platform is designed to make that equilibrium a dial you can turn, not a constant you accept.</p><h3>Organizational data at scale: what Bellemare’s book actually means in practice</h3><p>The subtitle of Bellemare’s book — <em>Leveraging Organizational Data at Scale</em> — sounds like a vendor pitch until you try to build a real-time enrichment pipeline and discover that the “data you already have” is scattered across:</p><ul><li>A core banking system that emits no events</li><li>A device fingerprinting service with a REST API rated at 20 req/s</li><li>A customer risk classification that lives in a nightly batch job</li><li>A transaction history sitting in a relational database optimized for OLTP, not analytical reads</li></ul><p>Enriching a transaction in real time against all of those sources, within a 300ms budget, is structurally impossible if you try to do it at decision time. The answer Bellemare prescribes — and this platform implements — is <strong>pre-materialization</strong>: enrich the data into the event stream <em>before</em> the scoring hop, so the scoring service receives a complete, self-contained fact and never needs to perform a synchronous lookup.</p><p>This is the architectural reasoning behind the transactions.enriched schema carrying avg_ticket, customer_risk_band, and known_device. Those fields are not denormalization for convenience — they are <strong>pre-computed features</strong> that decouple the scoring engine from every upstream data source. The scoring service has no knowledge of where those values come from. It receives a complete event and produces a decision. This is the bounded context boundary Bellemare describes as essential to independent deployability.</p><h3>The pipeline topology: every decision is load-bearing</h3><p>The Kafka topology is not a deployment detail — it is the architecture. Here is what the platform builds:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lXAU3pL_QoLvwtzozlM7aA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*ChePpMwY1Xtvcrs5.png" /></figure><p><strong>Why separate </strong><strong>transactions.raw from </strong><strong>transactions.enriched?</strong> The raw topic is an immutable record of what actually happened — no transformations, no inferences, no enrichment that could change if the enrichment logic changes. transactions.enriched is a derived view. If the enrichment logic is wrong, you fix it and replay transactions.raw to produce a corrected transactions.enriched. The raw log is your source of truth; the enriched log is a materialized view of it. This is Bellemare&#39;s &quot;single source of truth&quot; principle applied concretely.</p><p><strong>Why is partitioning by </strong><strong>account_id non-negotiable?</strong> Two of the five fraud rules — velocity (too many transactions within a time window for the same account) and geographic impossibility (implied travel speed computed from consecutive transactions for the same account) — require <strong>ordered, sequential processing of events for the same entity</strong>. Kafka guarantees ordering only within a partition. Partitioning by transaction_id would distribute load evenly and <strong>break both rules silently</strong> — the worst kind of failure, because the pipeline would appear healthy while producing incorrect decisions. Partitioning by account_id is not a preference; it is a correctness requirement.</p><p><strong>Why a separate </strong><strong>fraud.scored topic alongside </strong><strong>fraud.alerts?</strong> fraud.scored carries every decision — APPROVE, REVIEW, and DECLINE — with the full scoring breakdown. It is the <strong>auditability record</strong>: a forensic analyst, a regulator, or a dispute resolution team can replay it to reconstruct what the system knew and decided at any point in time. fraud.alerts is a filtered stream carrying only REVIEW and DECLINE decisions — a lower-volume operational signal designed for downstream consumers (case management, notification services, analyst tooling) that don&#39;t need the full decision log. Different consumers, different contracts, different retention policies. Mixing them into a single topic would conflate operational and audit concerns, forcing every consumer to filter the stream itself.</p><p><strong>Why a Dead-Letter Queue rather than retry-until-success?</strong> Head-of-line blocking — where a single malformed message prevents all subsequent messages in a partition from being processed — is one of the most insidious failure modes in event-driven systems. A poison message (invalid schema, null required field, data that triggers a processing exception) can freeze every account on a partition indefinitely if the consumer simply retries. The DLQ routes the failure out of the main flow, records x-dlq-reason for forensics, and allows processing to continue. The poison message becomes an observable event, not an invisible stall.</p><h3>Event contracts as organizational APIs</h3><p>This is the section of Bellemare’s book that most practitioners underweight — until they get burned by it.</p><p>The moment a second service consumes transactions.enriched, the schema of that topic becomes an <strong>inter-team API</strong>. It has callers. It has SLAs. Breaking it is not a refactor — it is a breaking change to a public contract, with all the communication, versioning, and migration work that implies.</p><p>The platform enforces this with <strong>Avro schemas registered in Confluent Schema Registry</strong> under <strong>BACKWARD</strong> compatibility — the strictest compatibility mode that allows adding optional fields while preventing the removal or type-change of existing ones. This turns a contract break from a 3 a.m. production incident (discovered when a downstream consumer crashes on an unexpected payload) into a <strong>CI failure</strong> (discovered when the schema registration is rejected before the code ships).</p><p>The schema design also demonstrates a forward-looking decision that is easy to overlook: transactions.enriched carries avg_ticket, customer_risk_band, and known_device not only because the current scoring engine needs them (it does), but because a <strong>machine learning model</strong> that doesn&#39;t yet exist will need them when it&#39;s added as a new consumer of that topic. The schema is the seam. Getting it right now means the ML team can attach a new consumer to transactions.enriched — without modifying the enrichment service, without negotiating a new data contract, without a migration — and begin scoring against pre-computed features on day one. This is Bellemare&#39;s point about events as the organizational nervous system: the schema is infrastructure for future capabilities you haven&#39;t built yet.</p><h3>The scoring engine: where Clean Architecture meets stream processing</h3><p>The fraud scoring service is the most architecturally interesting component in the platform, and deliberately the simplest to test.</p><p>It implements five rules against a pre-enriched transaction event:</p><p>RulePointsReasoningvelocity55Elevated transaction frequency is the primary signal in card-not-present fraudamount_anomaly55Values far beyond the cardholder&#39;s historical pattern indicate account compromisegeo_impossible65Implied travel speed between consecutive transactions is physically impossible — highest-confidence signalunknown_device_cnp30Unrecognized device on a card-not-present transaction elevates risk materiallyhigh_risk_band25Customer risk classification combined with elevated amount is a compound signal</p><p>Decision thresholds: score ≥ 80 → DECLINE, score ≥ 50 → REVIEW, else APPROVE.</p><p>The point values are not magic numbers — they encode explicit human judgments about signal confidence. geo_impossible scores higher than unknown_device_cnp because a physically impossible travel event is essentially irrefutable, while an unknown device on a CNP transaction could be a new device used legitimately. The threshold that separates REVIEW from DECLINE is a policy decision, not a technical one. The platform makes it a configuration value precisely so that the fraud operations team — not the engineering team — owns it.</p><p>Crucially, the scoring engine has <strong>zero knowledge of Kafka</strong>. It receives a Python dataclass, applies rules, and returns a decision object. There is no Kafka consumer, no topic reference, no offset management anywhere in the domain logic. The Kafka adapter is a thin shell around the domain core. This is Clean Architecture applied to stream processing: the business rules are testable without a running broker, deployable against any transport, and modifiable without risk of breaking the infrastructure wiring.</p><h3>The Case API: CQRS and the replayable read model</h3><p>The Case API is where a concept from event-driven theory becomes viscerally practical.</p><p>Analysts who manage fraud cases need a queryable interface — they cannot and should not page through raw Kafka topics. The Case API materializes fraud.alerts into MongoDB, projecting the stream into a document model optimized for the queries analysts actually run: cases by status, by account, by decision timestamp.</p><p>The critical property that makes this architecture resilient is that <strong>the MongoDB collection is disposable</strong>. It is a cache of the event log, not the source of truth. If the database is corrupted, accidentally dropped, migrated incorrectly, or needs to be rebuilt against corrected projection logic, the recovery procedure is: reset the consumer group offset to zero, replay fraud.alerts, and wait. The database rebuilds itself from the log.</p><p>This inverts the traditional backup calculus. In a CRUD-over-database architecture, the database is the system of record and its backup is the critical artifact. Here, the <strong>event log is the system of record</strong> and the database is a derived projection. The backup surface that matters is fraud.alerts — and Kafka&#39;s built-in retention is the backup strategy.</p><h3>Production topology on AWS: what “production-shaped” actually means</h3><p>The cloud deployment is not a convenience wrapper — it is a deliberate exercise in production discipline at lab cost.</p><p>The full stack runs on <strong>ECS Fargate</strong> behind a public <strong>Application Load Balancer</strong>, with service discovery via <strong>AWS Cloud Map</strong>, secrets managed through <strong>AWS Secrets Manager</strong> (no credentials in environment variables or container images), logs shipped to <strong>CloudWatch Logs</strong>, Terraform state persisted in <strong>S3 with DynamoDB locking</strong>, and <strong>Confluent Cloud</strong> providing fully managed Kafka, Schema Registry, and Apache Flink.</p><p>Custom container images for Prometheus and Grafana — with dashboards baked into the image build, not manually configured post-deploy — are pushed to <strong>ECR</strong> and deployed via a forced ECS service update. There is no manual step in the deployment path.</p><p>The honest cost for a four-hour session in us-east-1:</p><p>Resource~4hECS Fargate (7 services)~$0.32NAT Gateway~$0.20ALB~$0.03CloudWatch / Secrets / ECR~$0.05<strong>Total~$0.60</strong></p><p>terraform destroy tears it all down completely. The implicit lesson is FinOps discipline: production-shaped infrastructure should be billed by the hour, not left running because teardown is too painful.</p><h3>The trade-offs I would defend in a formal architecture review</h3><p>Good architecture is not the absence of weaknesses — it is the precise naming of them and the explicit choice to accept each one given the current context. Here is the honest scorecard:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9G9zg-vIdPUA22Dq0J9iAA.png" /></figure><p>The last row deserves elaboration. The feedback loop from analyst dispositions to training labels is not a nice-to-have — it is the architectural path from a static rules engine to an adaptive one. Every case disposition is a ground-truth label. Re-emit those as a stream and you have a continuously updated training dataset. The machine learning team needs a consumer on case.dispositions, not a data export or a pipeline rewrite. Bellemare calls this the organizational data flywheel: each operational decision, made visible as an event, feeds the next generation of the system that makes decisions.</p><h3>The observability pit wall: dashboards, four audiences</h3><p>A fraud platform you cannot observe is a black box. You learn it’s degrading when the customer calls. The platform ships Grafana dashboards, deliberately layered so that the same telemetry tells a different story to four distinct audiences. The metaphor from Bellemare’s world scales here too: you don’t operate “the system” — you read the pit wall.</p><p>All metrics follow the <strong>RED method</strong> — Rate, Errors, Duration. Every panel answers one of three questions: “how much is flowing?”, “how much is failing?”, or “how fast is it being processed?” Here is what each dashboard shows and what to look for in each.</p><h3>Dashboard Fraud Overview (operational heartbeat)</h3><p><strong>Audience:</strong> NOC / on-call. <strong>Question:</strong> “is everything flowing right now?”</p><p>This is the first screen you open when something feels wrong. Seven panels at 10-second refresh, 15-minute window:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*17r3ytugEBiToYtXHr_3NA.png" /></figure><h3>DashboardExecutive View (business language)</h3><p><strong>Audience:</strong> leadership. <strong>Question:</strong> “are we protecting customers and money?”</p><p>This dashboard translates engineering metrics into board-level language. There is no PromQL visible here — only decisions and outcomes:</p><ul><li><strong>Transactions Screened</strong> — volume reviewed in the last hour</li><li><strong>Fraud Rate %</strong> — percentage flagged as suspicious (REVIEW + DECLINE combined)</li><li><strong>Auto-Blocked (DECLINE)</strong> — fraud stopped without human intervention</li><li><strong>Under Investigation (REVIEW)</strong> — cases queued for analyst disposition</li><li><strong>Live Throughput</strong> — real-time transaction rate</li><li><strong>Decision Distribution</strong> — the APPROVE / REVIEW / DECLINE mix over time, stacked</li></ul><p>The key narrative: “Auto-Blocked high + Fraud Rate stable = the platform is earning its keep.” If “Under Investigation” is growing without analyst capacity to match, that is a human-in-the-loop bottleneck, not a technical failure — but it’s visible here first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X0N3_IKVQb5OfZkHBKvmDw.png" /><figcaption>Dashboard Executive View</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KsncMrJtOUYYro9bI_CPuw.png" /><figcaption>Dashboard Executive View</figcaption></figure><h3>Dashboard Financial &amp; Risk Impact (the ROI view)</h3><p><strong>Audience:</strong> risk management, CFO level. <strong>Question:</strong> “what is the financial exposure and what did we prevent?”</p><p>This dashboard runs on a 24-hour window and speaks in currency:</p><ul><li><strong>Estimated Losses Prevented</strong> — estimated value of blocked fraud in the window</li><li><strong>Financial Exposure Over Time ($/min)</strong> — how much would be at risk if detection failed</li><li><strong>Attack Vector Intelligence</strong> — breakdown by fraud pattern (velocity, geo, device, etc.)</li><li><strong>Automated Detection Coverage</strong> — percentage of fraud stopped without a human</li></ul><p>The exposure timeline is particularly powerful: it shows the peaks where attack pressure was highest, and confirms that the automated block rate held. The gap between exposure and actual loss is the platform’s financial justification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HDtj2qQ-4hkRJaequHgFXg.png" /><figcaption>Dashboard Financial &amp; Risk Impact (a visão de ROI)</figcaption></figure><h3>Dashboard Chaos &amp; SRE Lab (the incident war room)</h3><p><strong>Audience:</strong> SRE. <strong>Question:</strong> “what happens when I break it?”</p><p>This dashboard is purpose-built for the Lab 05 chaos exercises. It should be open and visible when you run each experiment:</p><p><strong>Exercise 1 — Poison message injection:</strong> Publish a malformed payload (missing required schema field). The “DLQ Events — Poison Message Detection” panel shows the spike at rate(fraud_events_failed_total[30s]). The critical observation: <strong>the pipeline throughput panel does not drop</strong>. The partition keeps flowing. Head-of-line blocking is defeated. The DLQ rate spikes; the main flow continues.</p><p><strong>Exercise 2 — Kill the scoring service:</strong> Stop the fraud-scoring container. The &quot;Scoring Consumer Lag p99&quot; panel climbs. The &quot;Decisions/sec&quot; panel drops to zero. The ScoringStalled alert arms. Restart the service: the decisions panel recovers, the lag drains, and the commit rate spikes as the backlog is processed. This is at-least-once delivery in a single visual sequence.</p><p><strong>Exercise 3 — Destroy and replay the read model:</strong> Drop the MongoDB fraud_cases collection. Reset the Case API consumer group offset to zero. The &quot;Case API Consumption Rate&quot; panel shows a processing spike as fraud.alerts is replayed. The database rebuilds itself from the event log. The backup that mattered was the topic, not the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lnTP-y2p1ssNRZD4AoBLug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*01uX59Aqz_oeJ3C6t6ZG0g.png" /></figure><h3>Confluent Cloud: the infrastructure that complete the story</h3><p>The Grafana dashboards show the application layer. Confluent Cloud shows the infrastructure it runs on.</p><h3>Topics overview (the pipeline topology, live)</h3><p>You will see the five topics that constitute the pipeline: transactions.raw, transactions.enriched, fraud.scored, fraud.alerts, fraud.dlq.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Db7NEsv-gOmtpVuOK-IQqQ.png" /><figcaption>Topic view</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7RoDshjB8_ZlKby--ZoITQ.png" /><figcaption>Stream Lineage view</figcaption></figure><h3>Schema Registry (contracts enforced)</h3><p>Navigate to <strong>Schema Registry</strong> → <strong>Schemas</strong>. You will find the Avro schemas for transactions.raw-value, transactions.enriched-value, fraud.scored-value, fraud.alerts-value. Click into transactions.enriched-value and expand the schema to show the avg_ticket, customer_risk_band, and known_device fields.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V7VNkD08KjrLp3yKolswTQ.png" /><figcaption>Pre-computed features baked into the event contract — the ML team’s future consumer attaches here without negotiating a new data model.</figcaption></figure><h3>Message inspector (the audit record)</h3><p>Navigate to <strong>Topics</strong> → fraud.scored → <strong>Messages</strong>. Use the message browser to inspect a scored transaction event. Expand the payload to show the decision, the score, and the reasons array (the per-rule breakdown).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UlvZ7qvL1cOUShqfoOPzDQ.png" /><figcaption>Every decision is a structured, replayable fact — not a log line.</figcaption></figure><h3>What stays after the lab</h3><p>Architecture is a series of bets on the future. The bets this project makes are deliberate.</p><p><strong>The bet I would defend in any design review today:</strong> the event as the unit of organizational truth. Not the database record. Not the API response. The event — immutable, timestamped, self-contained — is what makes auditability, replay, and independent service evolution possible at the same time. Everything else in this architecture is a consequence of that.</p><p><strong>What this project does not yet solve:</strong> real stateful windowing. The velocity and geo-impossibility rules here are in-memory approximations. In production, you want Apache Flink with RocksDB as the state backend — event-time processing, watermarks, exactly-once semantics. The enrichment pipeline on Confluent Cloud for Apache Flink that complements this workshop is the next step in that direction.</p><p><strong>What comes next, if you take this seriously:</strong> machine learning as an additive consumer of transactions.enriched — without modifying the enricher, without creating new coupling. And analysts emitting dispositions (CONFIRMED_FRAUD, FALSE_POSITIVE) as feedback events that feed the next training cycle. That is how the system learns: not as a batch job running at 2 a.m., but as a continuous flywheel — which is precisely what Bellemare describes as the real leverage of organizational data.</p><p>The question worth carrying into your next architecture review is not “which ML framework should we use?” It is more fundamental: <strong>where does your organization’s knowledge live, and at what cadence does it flow?</strong></p><p>If the answer is “in databases that don’t talk to each other and in jobs that run overnight” — the conversation about real-time fraud detection hasn’t started yet.</p><p>If this post was useful, the full code is in the repository below. If you run the lab, or if you disagree with any of the design decisions, I want to hear about it — comments here or on GitHub.</p><p><strong>Code: </strong><a href="https://github.com/lebidkaio/kafka-fraud-detection-workshop">https://github.com/lebidkaio/kafka-fraud-detection-workshop</a></p><p><em>Educational project, synthetic data, no employer affiliation. Stack: Python · Apache Kafka / Confluent Cloud · Apache Flink · MongoDB · Prometheus / Grafana · AWS ECS Fargate · Terraform.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1db54c207d30" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Construindo uma Plataforma de Detecção de Fraude em Tempo Real com Kafka: Arquitetura, Trade-offs e…]]></title>
            <link>https://medium.com/@kaieras/construindo-uma-plataforma-de-detec%C3%A7%C3%A3o-de-fraude-em-tempo-real-com-kafka-arquitetura-trade-offs-e-2234a57aba8f?source=rss-2d14ffadc533------2</link>
            <guid isPermaLink="false">https://medium.com/p/2234a57aba8f</guid>
            <category><![CDATA[confluent-kafka]]></category>
            <category><![CDATA[kafka]]></category>
            <category><![CDATA[apache-kafka]]></category>
            <category><![CDATA[confluent-cloud]]></category>
            <category><![CDATA[event-driven-architecture]]></category>
            <dc:creator><![CDATA[Kaio]]></dc:creator>
            <pubDate>Sun, 07 Jun 2026 20:22:04 GMT</pubDate>
            <atom:updated>2026-06-07T21:12:39.237Z</atom:updated>
            <content:encoded><![CDATA[<h3>Construindo uma Plataforma de Detecção de Fraude em Tempo Real com Kafka: Arquitetura, Trade-offs e o Imperativo dos Dados Organizacionais</h3><blockquote><em>Inspirado em “</em><a href="https://www.oreilly.com/library/view/building-event-driven-microservices/9781492057888/"><em>Building Event-Driven Microservices: Leveraging Organizational Data at Scale</em></a><em>”, de Adam Bellemare este projeto traduz os princípios do livro em uma plataforma de detecção de fraude, do pipeline Kafka aos contratos de evento, das decisões de topologia às escolhas arquiteturais que determinam se o sistema sobrevive ao contato com a realidade.</em></blockquote><p>Neste exato momento, enquanto você lê isso, dezenas de milhares de transações de cartão de crédito estão sendo autorizadas ao redor do mundo. Cada uma delas tem uma janela de, no máximo, 300 milissegundos para ser avaliada. Não existe pause. Não existe “vou checar depois”. A decisão — aprovar, revisar ou bloquear — precisa acontecer antes que a maquininha emita o bipe.</p><p>A maioria dos sistemas de fraude não foi construída para essa realidade. Foram construídos para o mundo de ontem: regras estáticas, modelos batch noturnos, analistas que revisam casos no dia seguinte. Funcionam bem o suficiente até que não funcionam — quando um novo vetor de ataque emerge, quando o volume escala, quando o regulador pede explicabilidade para cada decisão tomada nos últimos seis meses.</p><p>Este post é sobre o problema que vem antes do modelo de ML, antes do feature store sofisticado, antes do dashboard executivo: <strong>como construir a infraestrutura de dados que torna qualquer decisão de fraude em tempo real possível</strong>. A resposta, no final, tem menos a ver com tecnologia do que com como você modela o conhecimento da sua organização como um stream de eventos.</p><h3>O insight que reconfigura tudo</h3><p>Adam Bellemare abre <em>Building Event-Driven Microservices</em> com uma observação deceptivamente simples: a maioria das organizações já possui os dados necessários para tomar decisões inteligentes em tempo real — mas esses dados estão aprisionados em serviços isolados, jobs batch e bancos que não se comunicam no ritmo que o negócio exige.</p><p>O domínio de fraude torna essa tensão quase dolorosamente visível. Um banco processando uma transação de cartão tem, em algum lugar dos seus sistemas, tudo o que precisa para flagrar um fraudador: o histórico de gastos do titular, a impressão digital do dispositivo, o padrão geográfico, a classificação de risco e a velocidade transacional em todos os canais. A informação existe. O que não existe, na maioria das arquiteturas, é um mecanismo para montá-la em menos de 300 milissegundos enquanto a requisição de autorização espera na linha.</p><p>Esse gap entre dados que existem e decisões que não podem ser tomadas a tempo é exatamente o que a arquitetura orientada a eventos foi projetada para fechar. E fechá-lo bem exige tratar o problema não como um desafio de infraestrutura, mas como um <strong>problema de modelagem de domínio com consequências de infraestrutura</strong>.</p><p>Este workshop é o artefato de trabalhar esse problema desde os primeiros princípios, usando o framework de Bellemare como coluna vertebral intelectual.</p><h3>A restrição tripla que molda cada decisão arquitetural</h3><p>Antes de comprometer um único byte em um tópico, há uma restrição tripla que precisa ser nomeada explicitamente porque cada decisão de design nesta plataforma é consequência direta dela:</p><ol><li><strong>Latência</strong> — a janela de autorização não é negociável. Uma decisão de fraude que chega depois que o pagamento compensa não é uma decisão de fraude; é um relatório de incidente. Cada escolha arquitetural que adiciona latência precisa justificar sua existência contra esse orçamento.</li><li><strong>Acurácia</strong> — falsos negativos custam dinheiro. Falsos positivos custam clientes e, cada vez mais, credibilidade regulatória. As duas métricas estão em tensão estrutural: afrouxar regras para reduzir falsos positivos infla falsos negativos, e vice-versa. A plataforma precisa tornar essa tensão <em>observável e ajustável</em>, não escondê-la.</li><li><strong>Auditabilidade</strong> — reguladores do setor financeiro não aceitam “o modelo disse isso”. Cada decisão — aprovar, revisar, recusar — precisa carregar o <em>raciocínio</em> que a produziu, ser reproduzível meses depois e ser rastreável até os dados que existiam no momento da decisão.</li></ol><p>Essas três restrições não são individualmente difíceis de satisfazer. O que torna a arquitetura antifraude genuinamente difícil é que <strong>maximizar qualquer uma degrada as outras</strong>, e o equilíbrio correto muda à medida que o cenário de ameaças evolui. A plataforma é projetada para tornar esse equilíbrio um dial que se gira, não uma constante que se aceita.</p><h3>Dados organizacionais em escala: o que o livro de Bellemare realmente significa na prática</h3><p>O subtítulo do livro de Bellemare — <em>Leveraging Organizational Data at Scale</em> — soa como pitch de vendor até você tentar construir um pipeline de enriquecimento em tempo real e descobrir que os “dados que você já tem” estão espalhados por:</p><ul><li>Um sistema bancário central que não emite eventos</li><li>Um serviço de fingerprinting de dispositivo com uma API REST limitada a 20 req/s</li><li>Uma classificação de risco de cliente que vive em um job batch noturno</li><li>Um histórico transacional sentado em um banco relacional otimizado para OLTP, não para leituras analíticas</li></ul><p>Enriquecer uma transação em tempo real contra todas essas fontes, dentro de um orçamento de 300ms, é estruturalmente impossível se você tentar fazer isso no momento da decisão. A resposta que Bellemare prescreve — e que esta plataforma implementa — é <strong>pré-materialização</strong>: enriqueça os dados no stream de eventos <em>antes</em> do hop de scoring, de modo que o serviço de scoring receba um fato completo e autocontido e nunca precise realizar uma consulta síncrona.</p><p>Esse é o raciocínio arquitetural por trás do schema de transactions.enriched carregar avg_ticket, customer_risk_band e known_device. Esses campos não são desnormalização por conveniência — são <strong>features pré-computadas</strong> que desacoplam o motor de scoring de cada fonte de dados upstream. O serviço de scoring não tem conhecimento de onde esses valores vêm. Ele recebe um evento completo e produz uma decisão. Esse é o limite de bounded context que Bellemare descreve como essencial para deployabilidade independente.</p><h3>A topologia do pipeline</h3><p>A topologia Kafka não é um detalhe de deployment — ela é a arquitetura. Aqui está o que a plataforma constrói:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sELC9RWmNb_uJ-b07iWeSQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aRgH3shIh2tWw19rpsEPAg.png" /></figure><p>Cada escolha de design nessa topologia carrega uma intenção arquitetural específica:</p><p><strong>Por que separar </strong><strong>transactions.raw de </strong><strong>transactions.enriched?</strong> O tópico raw é um registro imutável do que realmente aconteceu sem transformações, sem inferências, sem enriquecimento que poderia mudar se a lógica de enriquecimento mudar. transactions.enriched é uma visão derivada. Se a lógica de enriquecimento estiver errada, você a corrige e faz replay de transactions.raw para produzir um transactions.enriched corrigido. O log raw é a sua fonte de verdade; o log enriquecido é uma visão materializada. Esse é o princípio da &quot;única fonte de verdade&quot; de Bellemare aplicado concretamente.</p><p><strong>Por que particionar por </strong><strong>account_id é não-negociável?</strong> Duas das cinco regras de fraude — velocity (transações demais dentro de uma janela de tempo para a mesma conta) e impossibilidade geográfica (velocidade de deslocamento implícita calculada de transações consecutivas para a mesma conta) exigem <strong>processamento ordenado e sequencial de eventos para a mesma entidade</strong>. O Kafka garante ordenação apenas dentro de uma partição. Particionar por transaction_id distribuiria a carga uniformemente e <strong>quebraria ambas as regras silenciosamente</strong> o pior tipo de falha, porque o pipeline pareceria saudável enquanto produziria decisões incorretas. Particionar por account_id não é preferência; é requisito de corretude.</p><p><strong>Por que um tópico </strong><strong>fraud.scored separado ao lado de </strong><strong>fraud.alerts?</strong> fraud.scored carrega cada decisão APPROVE, REVIEW e DECLINE com o breakdown completo do scoring. É o <strong>registro de auditabilidade</strong>: um analista forense, um regulador ou uma equipe de resolução de disputas pode fazer replay para reconstruir o que o sistema sabia e decidiu em qualquer ponto do tempo. fraud.alerts é um stream filtrado carregando apenas decisões REVIEW e DECLINE um sinal operacional de volume menor projetado para consumidores downstream (gestão de casos, serviços de notificação, ferramentas de analistas) que não precisam do log completo de decisões. Consumidores diferentes, contratos diferentes, políticas de retenção diferentes. Misturá-los em um único tópico conflaria preocupações operacionais e de auditoria, forçando cada consumidor a filtrar o stream por conta própria.</p><p><strong>Por que uma Dead-Letter Queue em vez de retry-até-sucesso?</strong> Head-of-line blocking onde uma única mensagem malformada impede o processamento de todas as mensagens subsequentes em uma partição é um dos modos de falha mais insidiosos em sistemas orientados a eventos. Uma mensagem veneno (schema inválido, campo obrigatório nulo, dados que disparam uma exceção de processamento) pode congelar todas as contas de uma partição indefinidamente se o consumer simplesmente fizer retry. A DLQ roteia a falha para fora do fluxo principal, registra x-dlq-reason para forense e permite que o processamento continue. A mensagem veneno se torna um evento observável, não uma pausa invisível.</p><h3>Contratos de evento como APIs organizacionais</h3><p>Esta é a seção do livro de Bellemare que a maioria dos praticantes subestima até ser queimada por isso.</p><p>No momento em que um segundo serviço consome transactions.enriched, o schema desse tópico se torna uma <strong>API inter-times</strong>. Ele tem chamadores. Ele tem SLAs. Quebrá-lo não é um refactor é uma breaking change em um contrato público, com todo o trabalho de comunicação, versionamento e migração que isso implica.</p><p>A plataforma impõe isso com <strong>schemas Avro registrados no Confluent Schema Registry</strong> sob compatibilidade <strong>BACKWARD</strong> o modo de compatibilidade mais restritivo que permite adicionar campos opcionais enquanto impede a remoção ou mudança de tipo de campos existentes. Isso transforma uma quebra de contrato de um incidente de produção às 3h (descoberto quando um consumidor downstream crasha em um payload inesperado) em uma <strong>falha de CI</strong> (descoberta quando o registro de schema é rejeitado antes do código ser entregue).</p><p>O design do schema também demonstra uma decisão prospectiva fácil de negligenciar: transactions.enriched carrega avg_ticket, customer_risk_band e known_device não apenas porque o motor de scoring atual precisa deles (precisa), mas porque um <strong>modelo de machine learning</strong> que ainda não existe vai precisar deles quando for adicionado como novo consumidor desse tópico. O schema é a costura. Acertá-lo agora significa que o time de ML pode acoplar um novo consumidor em transactions.enriched — sem modificar o serviço de enriquecimento, sem negociar um novo contrato de dados, sem uma migração — e começar a pontuar contra features pré-computadas no primeiro dia. Esse é o ponto de Bellemare sobre eventos como o sistema nervoso organizacional: o schema é infraestrutura para capacidades futuras que você ainda não construiu.</p><h3>O motor de scoring: onde Clean Architecture encontra stream processing</h3><p>O serviço de scoring de fraude é o componente arquiteturalmente mais interessante da plataforma, e deliberadamente o mais simples de testar.</p><p>Ele implementa cinco regras contra um evento de transação pré-enriquecido:</p><p>RegraPontosRaciocíniovelocity55Frequência elevada de transações é o sinal primário em fraude de cartão não presenteamount_anomaly55Valores muito além do padrão histórico do titular indicam comprometimento de contageo_impossible65Velocidade de deslocamento implícita entre transações consecutivas é fisicamente impossível — sinal de maior confiançaunknown_device_cnp30Dispositivo não reconhecido em transação sem cartão presente eleva o risco materialmentehigh_risk_band25Classificação de risco do cliente combinada com valor elevado é um sinal composto</p><p>Thresholds de decisão: score ≥ 80 → DECLINE, score ≥ 50 → REVIEW, senão APPROVE.</p><p>Os valores de pontos não são números mágicos — eles codificam julgamentos humanos explícitos sobre a confiança no sinal. geo_impossible pontua mais alto que unknown_device_cnp porque um evento de viagem fisicamente impossível é essencialmente irrefutável, enquanto um dispositivo desconhecido em transação CNP pode ser um novo dispositivo usado legitimamente. O threshold que separa REVIEW de DECLINE é uma decisão de política, não técnica. A plataforma o torna um valor de configuração precisamente para que o time de operações de fraude — não o time de engenharia — o possua.</p><p>Crucialmente, o motor de scoring tem <strong>zero conhecimento de Kafka</strong>. Ele recebe um dataclass Python, aplica regras e retorna um objeto de decisão. Não há consumer Kafka, nenhuma referência de tópico, nenhum gerenciamento de offset em qualquer lugar na lógica de domínio. O adaptador Kafka é uma camada fina ao redor do núcleo de domínio. Esse é o Clean Architecture aplicado a stream processing: as regras de negócio são testáveis sem um broker em execução, deployáveis contra qualquer transporte e modificáveis sem risco de quebrar a fiação de infraestrutura.</p><h3>A Case API: CQRS e o read model reproduzível por replay</h3><p>A Case API é onde um conceito da teoria orientada a eventos se torna visceralmente prático.</p><p>Analistas que gerenciam casos de fraude precisam de uma interface consultável — eles não podem e não deveriam percorrer tópicos Kafka brutos. A Case API materializa fraud.alerts no MongoDB, projetando o stream em um modelo de documento otimizado para as consultas que analistas realmente executam: casos por status, por conta, por timestamp de decisão.</p><p>A propriedade crítica que torna essa arquitetura resiliente é que <strong>a coleção MongoDB é descartável</strong>. É um cache do log de eventos, não a fonte de verdade. Se o banco for corrompido, acidentalmente dropado, migrado incorretamente ou precisar ser reconstruído contra uma lógica de projeção corrigida, o procedimento de recuperação é: resetar o offset do consumer group para zero, fazer replay de fraud.alerts e aguardar. O banco se reconstrói a partir do log.</p><p>Isso inverte o cálculo tradicional de backup. Em uma arquitetura CRUD-sobre-banco, o banco é o sistema de registro e seu backup é o artefato crítico. Aqui, o <strong>log de eventos é o sistema de registro</strong> e o banco é uma projeção derivada. A superfície de backup que importa é fraud.alerts — e a retenção nativa do Kafka é a estratégia de backup.</p><h3>Topologia na AWS</h3><p>A stack completa roda no <strong>ECS Fargate</strong> atrás de um <strong>Application Load Balancer</strong> público, com descoberta de serviço via <strong>AWS Cloud Map</strong>, segredos gerenciados pelo <strong>AWS Secrets Manager</strong>, logs enviados ao <strong>CloudWatch Logs</strong>, estado do Terraform persistido em <strong>S3 com locking via DynamoDB</strong>, e <strong>Confluent Cloud</strong> fornecendo Kafka totalmente gerenciado, Schema Registry e Apache Flink.</p><p>O custo honesto para uma sessão de quatro horas em us-east-1:</p><p>Recurso~4hECS Fargate (7 serviços)~US$ 0,32NAT Gateway~US$ 0,20ALB~US$ 0,03CloudWatch / Secrets / ECR~US$ 0,05<strong>Total~US$ 0,60</strong></p><h3>Os trade-offs que eu defenderia numa revisão formal de arquitetura</h3><p>Boa arquitetura não é a ausência de fraquezas — é o ato de nomeá-las com precisão e a escolha explícita de aceitar cada uma dado o contexto atual. Eis o placar honesto:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*GG_gsqOijabAJEoGFwOBtg.png" /></figure><p>A última linha merece elaboração. O loop de feedback das disposições de analistas para labels de treino não é um nice-to-have — é o caminho arquitetural de um motor de regras estático para um adaptativo. Cada disposição de caso é um label de verdade fundamental. Reemita esses como um stream e você tem um dataset de treino continuamente atualizado. O time de machine learning precisa de um consumer em case.dispositions, não de uma exportação de dados ou de uma reescrita de pipeline. Bellemare chama isso de flywheel de dados organizacionais: cada decisão operacional, tornada visível como um evento, alimenta a próxima geração do sistema que toma decisões.</p><h3>A observabilidade: dashboards, para quatro públicos</h3><p>Uma plataforma de fraude que você não consegue observar é uma caixa-preta. Você descobre que ela está degradando quando o cliente liga. O laboratório vem com dashboards Grafana, deliberadamente em camadas, para que a mesma telemetria conte uma história diferente para quatro públicos distintos. A metáfora do livro de Bellemare escala aqui também: você não opera “o sistema” — você lê o pit wall.</p><p>Todas as métricas seguem o <strong>modelo RED</strong> (Rate, Errors, Duration). Cada painel responde uma de três perguntas: “quanto está fluindo?”, “quanto está falhando?” ou “quão rápido está sendo processado?” Aqui está o que cada dashboard mostra e o que observar em cada um.</p><h3>Dashboard Fraud Overview (batimento cardíaco operacional)</h3><p><strong>Público:</strong> NOC / plantão. <strong>Pergunta:</strong> “está tudo fluindo agora?”</p><p>É a primeira tela que você abre quando algo parece errado.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*17r3ytugEBiToYtXHr_3NA.png" /></figure><h3>Dashboard Executive View</h3><p><strong>A </strong>liderança <strong>Pergunta:</strong> “estamos protegendo clientes e dinheiro?”</p><p>Este dashboard traduz métricas de engenharia para linguagem de diretoria. Não há PromQL visível aqui apenas decisões e resultados:</p><ul><li><strong>Transactions Screened</strong> — volume analisado na última hora</li><li><strong>Fraud Rate %</strong> — percentual sinalizado como suspeito (REVIEW + DECLINE combinados)</li><li><strong>Auto-Blocked (DECLINE)</strong> — fraude barrada sem intervenção humana</li><li><strong>Under Investigation (REVIEW)</strong> — casos na fila para disposição do analista</li><li><strong>Live Throughput</strong> — taxa de transações em tempo real</li><li><strong>Decision Distribution</strong> — a mistura APPROVE / REVIEW / DECLINE ao longo do tempo, empilhada</li></ul><p>A narrativa central: “Auto-Blocked alto + Fraud Rate estável = a plataforma está justificando seu custo.” Se “Under Investigation” está crescendo sem capacidade analítica correspondente, isso é um gargalo operacional humano, não uma falha técnica mas é visível aqui primeiro.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X0N3_IKVQb5OfZkHBKvmDw.png" /><figcaption>Dashboard Executive View</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KsncMrJtOUYYro9bI_CPuw.png" /><figcaption>Dashboard Executive View</figcaption></figure><h3>Dashboard Financial &amp; Risk Impact (a visão de ROI)</h3><p><strong>Público:</strong> gestão de risco, nível de CFO. <strong>Pergunta:</strong> “qual é a exposição financeira e o que foi evitado?”</p><p>Este dashboard roda em janela de 24 horas e fala em moeda:</p><ul><li><strong>Estimated Losses Prevented</strong> — valor estimado da fraude bloqueada na janela</li><li><strong>Financial Exposure Over Time (R$/min)</strong> — quanto estaria em risco se a detecção falhasse</li><li><strong>Attack Vector Intelligence</strong> — breakdown por padrão de fraude (velocity, geo, dispositivo, etc.)</li><li><strong>Automated Detection Coverage</strong> — percentual de fraude barrada sem humano</li></ul><p>A linha de exposição temporal é particularmente poderosa: ela mostra os picos onde a pressão de ataque foi maior e confirma que a taxa de bloqueio automático se sustentou. O gap entre exposição e perda real é a justificativa financeira da plataforma.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HDtj2qQ-4hkRJaequHgFXg.png" /><figcaption>Dashboard Financial &amp; Risk Impact (a visão de ROI)</figcaption></figure><h3>Dashboard Chaos &amp; SRE Lab (a war room de incidente)</h3><p><strong>Público:</strong> SRE. <strong>Pergunta:</strong> “o que acontece quando eu quebro?”</p><p>Este dashboard é feito sob medida para os exercícios de caos do Lab 05. Deve estar aberto e visível enquanto você executa cada experimento:</p><p><strong>Exercício 1 Injeção de mensagem veneno:</strong> Publique um payload malformado (campo obrigatório ausente no schema). O painel “DLQ Events — Poison Message Detection” mostra o pico em rate(fraud_events_failed_total[30s]). A observação crítica: <strong>o painel de throughput do pipeline não cai</strong>. A partição continua fluindo. O head-of-line blocking é derrotado. A taxa de DLQ tem um pico; o fluxo principal continua.</p><p><strong>Exercício 2 Matar o serviço de scoring:</strong> Pare o container fraud-scoring. O painel &quot;Scoring Consumer Lag p99&quot; sobe. O painel &quot;Decisions/sec&quot; cai a zero. O alerta ScoringStalled arma. Reinicie o serviço: o painel de decisões se recupera, o lag drena e a taxa de commit tem um pico enquanto o backlog é processado. Essa é a entrega at-least-once em uma sequência visual única.</p><p><strong>Exercício 3 Destruir e reconstruir o read model:</strong> Drope a coleção MongoDB fraud_cases. Resete o offset do consumer group da Case API para zero. O painel &quot;Case API Consumption Rate&quot; mostra um pico de processamento enquanto fraud.alerts é reproduzido. O banco se reconstrói a partir do log de eventos. O backup que importava era o tópico, não o banco.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*01uX59Aqz_oeJ3C6t6ZG0g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lnTP-y2p1ssNRZD4AoBLug.png" /></figure><h3>Confluent Cloud: ainfraestrutura que completam a história</h3><p>Para a camada de streaming de eventos, utilizamos o Confluent Cloud como o backbone gerenciado de processamento e distribuição de eventos da plataforma. Ele é responsável por fornecer a infraestrutura necessária para ingestão, transporte e processamento de dados em tempo real, permitindo a comunicação assíncrona entre os diversos componentes da solução.</p><p>Enquanto os dashboards do Grafana oferecem visibilidade sobre a camada de aplicaçãomonitorando métricas de negócio, saúde dos serviços, desempenho operacional e comportamento dos microsserviços o Confluent Cloud fornece observabilidade sobre a infraestrutura de streaming de eventos, incluindo tópicos, grupos de consumidores, throughput, latência, utilização de recursos e disponibilidade da plataforma.</p><h3>Visão geral de tópicos Confluent Cloud</h3><p>Stream Lineage view</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7RoDshjB8_ZlKby--ZoITQ.png" /><figcaption>Stream Lineage view</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Db7NEsv-gOmtpVuOK-IQqQ.png" /><figcaption>Visão dos tópicos utilizados no laboratório</figcaption></figure><h3>Schema Registry (contratos impostos)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V7VNkD08KjrLp3yKolswTQ.png" /><figcaption>“Features pré-computadas gravadas no contrato de evento — o consumidor futuro do time de ML se acopla aqui sem negociar um novo modelo de dados.”</figcaption></figure><h3>Inspetor de mensagens (o registro de auditoria)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UlvZ7qvL1cOUShqfoOPzDQ.png" /></figure><h3>O que fica depois do lab</h3><p>Arquitetura é uma série de apostas no futuro. As apostas que este projeto faz são deliberadas:</p><p><strong>A aposta que eu defenderia numa revisão de design hoje:</strong> o evento como unidade de verdade organizacional. Não o registro do banco. Não a resposta da API. O evento — imutável, timestampado, autocontido — é o que torna auditabilidade, replay e evolução independente de serviços possíveis ao mesmo tempo. Tudo mais nesta arquitetura é consequência disso.</p><p><strong>O que este projeto ainda não resolve:</strong> windowing com estado real. As regras de velocidade e geo-impossibilidade aqui são aproximações em memória. Em produção, você quer Apache Flink com RocksDB como state backend — event-time processing, watermarks, exatamente-uma-vez semântica. O pipeline de enriquecimento no Confluent Cloud for Apache Flink que complementa este workshop é o próximo passo nessa direção.</p><p><strong>O que vem depois, se você levar isso a sério:</strong> machine learning como um consumidor adicional de transactions.enriched — sem modificar o enriquecedor, sem criar acoplamento novo. E analistas emitindo disposições (CONFIRMED_FRAUD, FALSE_POSITIVE) como eventos de feedback que alimentam o próximo ciclo de treinamento. É assim que o sistema aprende: não como um batch job rodando na madrugada, mas como um flywheel contínuo que Bellemare descreve como o verdadeiro leverage dos dados organizacionais.</p><p>A pergunta que vale carregar para a próxima revisão de arquitetura não é “qual framework de ML vamos usar?” É mais fundamental: <strong>onde vive o conhecimento da sua organização, e em qual ritmo ele flui?</strong></p><p>Se a resposta for “em bancos que não falam entre si e em jobs que rodam de madrugada” — a conversa sobre real-time fraud detection ainda não começou.</p><p>Se este post foi útil, o código completo está no repositório abaixo. Se você montar o lab, ou se discordar de alguma decisão de design, quero saber — comentários aqui ou no GitHub.</p><p>➡️ <strong>Código &amp; workshop: </strong><a href="http://github.com/lebidkaio/kafka-fraud-detection-workshop.">github.com/lebidkaio/kafka-fraud-detection-workshop.</a></p><p><em>Projeto educacional, dados sintéticos, sem afiliação com qualquer empresa.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2234a57aba8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>