<?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 Shashank Verma on Medium]]></title>
        <description><![CDATA[Stories by Shashank Verma on Medium]]></description>
        <link>https://medium.com/@shankverma?source=rss-4a73ad389d82------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*niFf9eBSrea7lmbh.jpg</url>
            <title>Stories by Shashank Verma on Medium</title>
            <link>https://medium.com/@shankverma?source=rss-4a73ad389d82------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 16:52:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shankverma/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[Understanding CDC Internals: Snapshots, Offsets, and Recovery]]></title>
            <link>https://medium.com/@shankverma/understanding-cdc-internals-snapshots-offsets-and-recovery-09d358662560?source=rss-4a73ad389d82------2</link>
            <guid isPermaLink="false">https://medium.com/p/09d358662560</guid>
            <category><![CDATA[aws-msk]]></category>
            <category><![CDATA[cdc-pipeline]]></category>
            <category><![CDATA[kafka-connect]]></category>
            <category><![CDATA[change-data-capture]]></category>
            <category><![CDATA[debezium]]></category>
            <dc:creator><![CDATA[Shashank Verma]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 23:43:14 GMT</pubDate>
            <atom:updated>2026-11-12T23:49:10.339Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Part 3 of a series on building a production-grade modern data platform</em></p><h3>Introduction:</h3><p>In Part 2, we looked at how Debezium captures changes from Oracle and publishes them to Amazon MSK using Kafka Connect.</p><p>But there are a few important questions that come up when running CDC pipelines in production:</p><ul><li>What happens when Debezium starts for the first time?</li><li>How does it capture existing records before streaming new changes?</li><li>How does it know where to resume if the connector restarts?</li><li>What happens when a record is deleted?</li><li>How do we recover when something goes wrong?</li></ul><p>Understanding these concepts is important because a CDC pipeline is not just about moving events from one system to another. It is about maintaining consistency and ensuring that changes are not lost during failures or interruptions.</p><p>Let’s look at some of the key concepts.</p><h3>1. Initial Snapshot: Capturing Existing Data</h3><p>When Debezium starts capturing changes from an Oracle database for the first time, it needs to establish an initial view of the existing data.</p><p>This is where the snapshot process comes in.</p><p>Imagine an Oracle table with 10 million existing records. If Debezium only starts reading new database changes from that point onward, downstream systems will never receive the existing 10 million records.</p><p>An initial snapshot solves this problem.</p><p>At a high level, the process works as follows:</p><ol><li>Debezium establishes a consistent point in the database transaction history using an Oracle SCN.</li><li>It reads the existing records from the configured tables.</li><li>It publishes those records to Kafka as snapshot events.</li><li>Once the snapshot is complete, it transitions to streaming changes from the corresponding position in the transaction logs.</li></ol><p>This gives downstream systems an initial copy of the data, followed by ongoing changes.</p><p>For example, Debezium uses the operation code r to identify records generated during a snapshot.</p><p>The important distinction is that snapshot events represent the existing state of a record, whereas streaming events represent changes captured from database transactions.</p><h3>2. Understanding SCN (System Change Number)</h3><p>SCN is an important concept when working with Oracle CDC.</p><p>Oracle uses System Change Numbers to identify positions in its transaction history. They provide a way to establish the relative ordering of database changes.</p><p>Debezium uses SCN information when coordinating snapshots and reading changes through Oracle LogMiner.</p><p>Think of SCN as a reference point in Oracle’s transaction history.</p><p>For example:</p><ul><li>SCN 1000: Initial snapshot reference point.</li><li>SCN 1005: A customer record is updated.</li><li>SCN 1010: An order record is inserted.</li><li>SCN 1015: A customer record is deleted.</li></ul><p>These numbers are illustrative, but they help explain how changes can be associated with positions in the transaction history.</p><p>SCN information is particularly important when transitioning from an initial snapshot to streaming. It helps Debezium establish where to begin reading subsequent changes.</p><h3>3. Kafka Connect Offsets: Knowing Where to Resume</h3><p>One of the most important aspects of a production CDC pipeline is offset management.</p><p>Imagine Debezium has been running successfully for several hours, publishing thousands of changes to Amazon MSK.</p><p>Suddenly, the connector stops because of a worker restart or an infrastructure issue.</p><p>When it starts again, how does it know where to continue?</p><p>This is where Kafka Connect offsets come into play.</p><p>Kafka Connect maintains connector progress information in its internal offsets topic.</p><p>For a Debezium Oracle connector, this information includes the source position needed to resume processing, including relevant Oracle log position information.</p><p>The general flow looks like this:</p><ol><li>Debezium reads changes from Oracle.</li><li>It publishes corresponding events to Kafka.</li><li>Kafka Connect periodically commits the connector’s source offsets.</li><li>If the connector restarts, it retrieves its previously committed offsets.</li><li>It resumes processing from the recorded source position.</li></ol><p>It is important to understand that Kafka Connect offsets and Kafka consumer offsets are two different things.</p><ul><li><strong>Source connector offsets:</strong> Track how far Debezium has progressed in reading the Oracle database.</li><li><strong>Consumer offsets:</strong> Track how far a downstream Kafka consumer has progressed in reading Kafka topics.</li></ul><p>These serve different purposes and should not be confused.</p><h3>4. Understanding Deletes and Tombstone Events</h3><p>Deletes are another important consideration when implementing CDC pipelines.</p><p>When a record is deleted from Oracle, Debezium publishes a delete event containing information about the deleted record.</p><p>However, there is another concept worth understanding: tombstone events.</p><p>In Kafka, a tombstone is a message with a valid record key and a null value.</p><p>Why is this useful?</p><p>Kafka topics can be configured with log compaction. Log compaction retains the latest value for each key, rather than retaining every historical update indefinitely.</p><p>A tombstone indicates that a particular key has been deleted and allows Kafka’s compaction process to eventually remove the corresponding record.</p><p>A simplified example:</p><p><strong>Before deletion:</strong></p><pre>{<br>  &quot;key&quot;: {<br>    &quot;CUSTOMER_ID&quot;: 101<br>  },<br>  &quot;value&quot;: {<br>    &quot;CUSTOMER_ID&quot;: 101,<br>    &quot;STATUS&quot;: &quot;ACTIVE&quot;<br>  }<br>}</pre><p><strong>Delete event:</strong></p><p>Debezium publishes a delete event containing the previous record information.</p><p><strong>Tombstone event:</strong></p><pre>{<br>  &quot;key&quot;: {<br>    &quot;CUSTOMER_ID&quot;: 101<br>  },<br>  &quot;value&quot;: null<br>}</pre><p>The distinction matters when designing downstream consumers and configuring Kafka Connect sink connectors.</p><p>For example, a PostgreSQL sink connector needs to interpret delete events appropriately if the goal is to maintain a replica of the Oracle table.</p><h3>5. What Happens When a Connector Fails?</h3><p>Failures are inevitable in distributed systems.</p><p>A Kafka Connect worker can restart, an MSK broker can become unavailable, or Oracle connectivity can be interrupted.</p><p>The important question is how the pipeline recovers.</p><p>Consider a scenario where the Debezium connector has been processing changes successfully but suddenly stops.</p><p>When the connector restarts:</p><ol><li>Kafka Connect retrieves the previously committed source offsets.</li><li>Debezium uses the recorded Oracle source position to resume processing.</li><li>It continues reading available changes from Oracle’s redo and archived redo logs.</li><li>New CDC events are published to the corresponding Kafka topics.</li></ol><p>However, successful recovery depends on one critical condition: the required Oracle redo and archived redo logs must still be available.</p><p>If the logs needed to resume processing have been deleted or are no longer accessible, the connector may not be able to continue from its previous position.</p><p>Depending on the situation, recovery may require restoring the necessary logs or performing a new snapshot.</p><p>This is why Oracle archive log retention needs to be aligned with the expected CDC downtime and recovery requirements.</p><h3>Conclusion</h3><p>Building a CDC pipeline involves much more than capturing database changes and publishing them to Kafka.</p><p>Snapshots establish the initial state, SCNs provide a reference point in Oracle’s transaction history, offsets help connectors resume processing, and tombstones support delete semantics in Kafka.</p><p>Understanding these concepts helps us build CDC pipelines that can handle restarts, interruptions, and failures without losing sight of data consistency.</p><p>In the next installment, we’ll look at Kafka Connect in more detail, including source and sink connectors, topic design, serialization, error handling, and how CDC events are delivered to downstream systems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09d358662560" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CDC in Production: What Happens Between Oracle and Kafka?]]></title>
            <link>https://medium.com/@shankverma/cdc-in-production-what-happens-between-oracle-and-kafka-20f345ab3ce9?source=rss-4a73ad389d82------2</link>
            <guid isPermaLink="false">https://medium.com/p/20f345ab3ce9</guid>
            <category><![CDATA[event-streaming]]></category>
            <category><![CDATA[debezium]]></category>
            <category><![CDATA[change-data-capture]]></category>
            <category><![CDATA[kafka-connect]]></category>
            <category><![CDATA[aws-msk]]></category>
            <dc:creator><![CDATA[Shashank Verma]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 17:49:43 GMT</pubDate>
            <atom:updated>2026-11-13T00:10:33.327Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Part 2 of a series on building a production-grade modern data platform</em></p><h3>Introduction</h3><p>Although this article uses Oracle as the primary example, the underlying CDC architecture is not limited to Oracle. Debezium supports multiple relational databases, including PostgreSQL, MySQL, SQL Server, and Db2. The database-specific mechanisms used to capture changes differ, but the overall pattern of capturing, publishing, and consuming database events remains similar.</p><p>In Part 1, we looked at how to design a modern data ingestion architecture that moves data from Oracle into the cloud.</p><p>One of the key pieces of that architecture is Change Data Capture (CDC).</p><p>But how do changes in an Oracle database actually make their way into Kafka?</p><p>This is where two technologies come into play:</p><ul><li><strong>Debezium:</strong> Captures changes from the source database.</li><li><strong>Apache Kafka / Amazon MSK:</strong> Provides a distributed platform to publish, store, and consume those changes.</li></ul><p>Let’s look at how these two components work together.</p><h3>1. Understanding the role of Debezium</h3><p>Debezium is an open-source distributed platform for Change Data Capture. It provides connectors for databases such as Oracle, PostgreSQL, MySQL, and SQL Server.</p><p>Debezium uses database-specific mechanisms to capture changes. For Oracle, this typically involves LogMiner; PostgreSQL uses logical decoding, while MySQL relies on binary logs (binlogs). These differences are abstracted by Debezium, which publishes the captured changes as structured Kafka events.</p><p>Instead of continuously querying database tables to identify what has changed, Debezium captures changes from the database transaction logs.</p><p>For Oracle, Debezium primarily uses Oracle LogMiner to read changes from redo and archived redo logs.</p><p>These logs contain information about database transactions, including inserts, updates, and deletes.</p><p>At a high level, the process looks like this:</p><ol><li>An application inserts, updates, or deletes a record in Oracle.</li><li>Oracle records the corresponding changes in its redo logs.</li><li>Debezium reads and processes those changes through LogMiner.</li><li>Debezium converts the changes into structured events.</li><li>Those events are published to Kafka topics.</li></ol><p>This allows downstream applications to consume database changes without repeatedly querying the source database.</p><h3>2. Preparing Oracle for CDC</h3><p>Before Debezium can capture changes, Oracle needs to be configured appropriately.</p><p>There are two important prerequisites:</p><p><strong>Archive Logging</strong></p><p>Oracle must be configured to run in ARCHIVELOG mode so that redo logs are archived and available for mining.</p><p><strong>Supplemental Logging</strong></p><p>Oracle does not automatically capture all the column information that a CDC process may need to identify changed rows.</p><p>Supplemental logging provides additional information in the redo logs, allowing Debezium to identify affected records and construct change events.</p><p>For example:</p><pre>-- Enable minimal supplemental logging<br>ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;</pre><pre>-- Enable supplemental logging for a captured table<br>ALTER TABLE TEMPO.AGREEMENT_NOTES<br>ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;</pre><p>The table-level configuration should be applied selectively to tables being captured, since logging additional column information increases redo log volume.</p><h3>3. Introducing Amazon MSK</h3><p>Now that Debezium can capture database changes, we need somewhere to publish and distribute those events.</p><p>This is where Amazon MSK (Managed Streaming for Apache Kafka) comes in.</p><p>Amazon MSK is AWS’s managed Apache Kafka service. It provides the underlying Kafka infrastructure without requiring teams to manage every aspect of the broker deployment themselves.</p><p>In our architecture, MSK serves three primary purposes:</p><ul><li><strong>Event streaming:</strong> Receives CDC events published by Debezium.</li><li>Event retention: Stores events according to Kafka topic retention policies, allowing downstream consumers to process them independently and at their own pace.</li><li><strong>Decoupling:</strong> Allows multiple downstream applications to consume the same events without directly connecting to Oracle.</li></ul><p>Debezium acts as the producer of CDC events, while Kafka topics provide the mechanism for distributing those events to downstream consumers.</p><h3>4. Connecting Debezium to Amazon MSK</h3><p>Debezium integrates with Kafka through Kafka Connect.</p><p>In an AWS environment, Amazon MSK Connect can provide the managed runtime for deploying and operating connectors, including Debezium.</p><p>The relationship between these components is straightforward:</p><ul><li>Oracle is the source database.</li><li>Debezium is responsible for capturing changes.</li><li>Kafka Connect runs the Debezium connector.</li><li>Amazon MSK receives and stores the resulting events.</li></ul><p>The overall flow looks like this:</p><pre>     Oracle Database<br>     (Redo / Archive Logs)<br>             |<br>        LogMiner API<br>             |<br>    Debezium Oracle Connector<br>      (running inside Kafka Connect / MSK Connect)<br>             |<br>        Amazon MSK<br>             |<br>        Kafka Topics<br>             |<br>    Downstream Consumers</pre><h3>5. Understanding Kafka Topics</h3><p>When Debezium captures changes, it publishes events to Kafka topics.</p><p>Typically, Debezium creates topics based on the configured topic prefix, database schema, and table name.</p><p>For example:</p><pre>oracle-cdc.TEMPO.AGREEMENT_NOTES<br>oracle-cdc.TEMPO.CLIENT_STATEMENT_LETTER<br>oracle-cdc.TEMPO.CUSTOMERS</pre><p>This provides a logical separation of changes by source table.</p><p>A downstream consumer can subscribe to an individual topic or consume multiple topics depending on its requirements.</p><p>For example, a PostgreSQL sink connector could consume these topics and replicate the changes into corresponding PostgreSQL tables.</p><h3>6. What does a CDC event look like?</h3><p>A CDC event represents a change made to a database record.</p><p>For example, consider an update to a customer record.</p><p>The event contains information such as:</p><ul><li>The record key.</li><li>The previous record state (before).</li><li>The updated record state (after).</li><li>The operation type (op).</li><li>Source metadata, including database and transaction information.</li></ul><p>The following is a simplified representation of the event value. In an actual Kafka record, the key is typically derived from the source table’s primary key, while the value contains the change event and associated metadata.</p><p>A simplified example:</p><pre>{<br>  &quot;before&quot;: {<br>    &quot;CUSTOMER_ID&quot;: 101,<br>    &quot;CUSTOMER_NAME&quot;: &quot;John&quot;,<br>    &quot;STATUS&quot;: &quot;ACTIVE&quot;<br>  },<br>  &quot;after&quot;: {<br>    &quot;CUSTOMER_ID&quot;: 101,<br>    &quot;CUSTOMER_NAME&quot;: &quot;John&quot;,<br>    &quot;STATUS&quot;: &quot;INACTIVE&quot;<br>  },<br>  &quot;op&quot;: &quot;u&quot;<br>}</pre><p>Here, op: u represents an update.</p><p>Other common operation codes include:</p><ul><li>c – Create</li><li>u – Update</li><li>d – Delete</li><li>r – Read (snapshot)</li></ul><p>This structured representation makes it possible for downstream systems to understand not just the latest record state, but also what operation caused the change.</p><h3>Conclusion</h3><p>Debezium and Amazon MSK form the core of the CDC layer in our architecture.</p><p>Debezium is responsible for understanding and capturing database changes, while MSK provides a scalable and durable event streaming platform to distribute those changes.</p><p>Together, they establish a foundation for building real-time data pipelines without relying on continuous polling or repeated table scans. Although CDC still introduces some processing overhead on the source database, it provides a more efficient approach to capturing changes than repeatedly querying entire tables.</p><p>While Oracle is used throughout this article to demonstrate the implementation, the same architectural pattern can be extended to other relational databases. By combining Debezium with Kafka and a managed streaming platform such as Amazon MSK, organizations can build flexible CDC pipelines across heterogeneous database environments.</p><p>Additional Resources:</p><ul><li><a href="https://debezium.io/documentation/reference/stable/connectors/oracle.html?utm_source=chatgpt.com">Debezium Oracle Connector documentation</a></li><li><a href="https://debezium.io/documentation/reference/stable/kc-tutorial.html?utm_source=chatgpt.com">Debezium Kafka Connect tutorial</a></li><li><a href="https://docs.aws.amazon.com/msk/latest/developerguide/msk-connect.html?trk=article-ssr-frontend-pulse_little-text-block&amp;utm_source=chatgpt.com">Amazon MSK Connect documentation</a></li><li><a href="https://debezium.io/documentation/reference/stable/transformations/event-flattening.html?utm_source=chatgpt.com">Debezium event structure and transformations</a></li></ul><p>In the next installment, we’ll look more closely at how these CDC events are consumed and replicated into downstream systems, including PostgreSQL and Amazon S3.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20f345ab3ce9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Oracle to the Cloud: Designing a Modern Data Ingestion Architecture]]></title>
            <link>https://medium.com/@shankverma/from-oracle-to-the-cloud-designing-a-modern-data-ingestion-architecture-0f568e56998a?source=rss-4a73ad389d82------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f568e56998a</guid>
            <category><![CDATA[event-streaming]]></category>
            <category><![CDATA[data-ingestion]]></category>
            <category><![CDATA[kafka-streams]]></category>
            <category><![CDATA[data-replication]]></category>
            <category><![CDATA[change-data-capture]]></category>
            <dc:creator><![CDATA[Shashank Verma]]></dc:creator>
            <pubDate>Mon, 05 Oct 2026 04:28:53 GMT</pubDate>
            <atom:updated>2026-10-05T04:28:53.071Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Part 1 of a series on building a production-grade modern data platform</em></p><p>Moving an enterprise database to the cloud sounds straightforward until you encounter the reality of the data.</p><p>An organization may have decades of operational data sitting in Oracle, applications that depend on that database, reporting workloads running against it, and downstream teams that need access to the data without disrupting the source system.</p><p>The challenge isn’t simply <strong>how to copy the data</strong>.</p><p>The real challenge is designing an architecture that can handle:</p><ul><li>Large historical datasets</li><li>Continuous changes from the source</li><li>Minimal impact on production systems</li><li>Reliable delivery</li><li>Data consistency</li><li>Failure recovery</li><li>Future analytical and AI/ML workloads</li></ul><p>This article describes an architecture for modernizing an Oracle-based data platform using AWS services, with <strong>Amazon S3 as the foundational storage layer and Amazon MSK as the real-time streaming backbone</strong>.</p><p>This is the first part of a series. Later articles will dive deeper into CDC, Apache Iceberg, Kafka Connect, data governance, and operational reliability.</p><h3>The Problem</h3><p>Imagine an enterprise application where Oracle has been the system of record for many years.</p><p>The database contains:</p><ul><li>Customer information</li><li>Agreements</li><li>Transactions</li><li>Reference data</li><li>Application metadata</li><li>Historical records</li></ul><p>The organization now wants to move toward a modern cloud data platform.</p><p>The desired end state looks something like this:</p><pre>                  ┌─────────────────────┐<br>                  │    Oracle Database  │<br>                  │   System of Record  │<br>                  └──────────┬──────────┘<br>                             │<br>                    Initial + Incremental<br>                             │<br>              ┌──────────────┴──────────────┐<br>              │                             │<br>              ▼                             ▼<br>       Historical Load                 CDC / Streaming<br>              │                             │<br>              ▼                             ▼<br>             S3                           MSK<br>              │                             │<br>              └──────────────┬──────────────┘<br>                             ▼<br>                      Data Processing<br>                             │<br>                             ▼<br>                    Modern Data Platform</pre><p>At first glance, this seems simple.</p><p>But there is an important architectural question:</p><p><strong>How do we move the existing data and then continuously capture changes without creating gaps or duplicating data?</strong></p><p>That’s where the architecture becomes interesting.</p><h3>Why a Simple Batch Pipeline Isn’t Enough</h3><p>The simplest approach would be:</p><pre>Oracle → ETL → S3</pre><p>Run it once, copy the data, and you’re done.</p><p>But enterprise databases rarely stop changing.</p><p>While the initial extraction is running:</p><pre>Record A → unchanged<br>Record B → updated<br>Record C → deleted<br>Record D → inserted</pre><p>The source database continues receiving transactions.</p><p>If the pipeline only performs a batch extraction, the cloud copy becomes stale almost immediately.</p><p>One option is to run increasingly frequent batch jobs.</p><p>For example:</p><pre>Oracle<br>   ↓<br>Daily Extract<br>   ↓<br>S3</pre><p>Then:</p><pre>Oracle<br>   ↓<br>Hourly Extract<br>   ↓<br>S3</pre><p>Eventually, organizations start asking for near-real-time data.</p><p>At that point, you’re solving a streaming problem with a batch tool.</p><p>A better architecture separates two concerns:</p><p><strong>Historical data movement</strong> and <strong>continuous change capture</strong>.</p><h3>The Two-Phase Ingestion Model</h3><p>A more robust design uses two complementary paths.</p><h3>Phase 1 — Historical Load</h3><p>Move the existing data from Oracle into cloud storage.</p><pre> Oracle<br>   │<br>   │ Full Load<br>   ▼<br>  S3</pre><p>This establishes the initial dataset.</p><h3>Phase 2 — Change Data Capture</h3><p>Capture changes occurring after and during the migration.</p><pre>Oracle<br>   │<br>   │ CDC<br>   ▼<br>Debezium<br>   │<br>   ▼<br>Amazon MSK</pre><p>The streaming layer captures events such as:</p><pre>INSERT<br>UPDATE<br>DELETE</pre><p>This allows downstream systems to remain synchronized with the source.</p><p>The combined architecture becomes:</p><pre>                        Oracle<br>                           │<br>             ┌─────────────┴─────────────┐<br>             │                           │<br>        Full Load                       CDC<br>             │                           │<br>             ▼                           ▼<br>            S3                      Debezium<br>                                         │<br>                                         ▼<br>                                    Amazon MSK<br>                                         │<br>                                         ▼<br>                                  Stream Processing<br>                                         │<br>                         ┌───────────────┴──────────────┐<br>                         ▼                              ▼<br>                        S3                         Operational DB</pre><p>This pattern is one of the fundamental building blocks of modern data platforms.</p><h3>Why Amazon MSK?</h3><p>Once CDC enters the architecture, we need somewhere to reliably distribute those change events.</p><p>That’s where <strong>Amazon Managed Streaming for Apache Kafka (MSK)</strong> fits.</p><p>Kafka provides a durable event-streaming layer between producers and consumers.</p><p>Instead of connecting every downstream application directly to Oracle:</p><pre>              Oracle<br>             /  |  \<br>            /   |   \<br>           ▼    ▼    ▼<br>        App A App B App C</pre><p>we introduce an event backbone:</p><pre>                  Oracle<br>                    │<br>                 Debezium<br>                    │<br>                    ▼<br>               Amazon MSK<br>              /     |     \<br>             /      |      \<br>            ▼       ▼       ▼<br>         S3/Iceberg  PostgreSQL  Analytics</pre><p>This changes the architecture significantly.</p><p>The source system doesn’t need to know every downstream consumer.</p><p>New consumers can subscribe to the appropriate Kafka topics without modifying the source integration.</p><h3>Designing the Kafka Topic Layer</h3><p>One of the first design decisions is how to organize topics.</p><p>A simple approach might be:</p><pre>oracle.customer<br>oracle.agreement<br>oracle.transaction<br>oracle.payment</pre><p>But topic naming becomes important as the platform grows.</p><p>Topics should provide enough context to identify:</p><ul><li>Source system</li><li>Environment</li><li>Schema/domain</li><li>Table/entity</li><li>Version where appropriate</li></ul><p>For example:</p><pre>&lt;source&gt;.&lt;schema&gt;.&lt;entity&gt;</pre><p>could produce:</p><pre>oracle.customer<br>oracle.agreement<br>oracle.payment</pre><p>The exact naming convention is less important than having a <strong>consistent, documented standard</strong>.</p><p>Why?</p><p>Because Kafka topics eventually become contracts between producers and consumers.</p><h3>What Does a CDC Event Look Like?</h3><p>A CDC event is more than just a database row.</p><p>Conceptually, an event might look like:</p><pre>{<br>  &quot;before&quot;: {<br>    &quot;customer_id&quot;: 101,<br>    &quot;status&quot;: &quot;ACTIVE&quot;<br>  },<br>  &quot;after&quot;: {<br>    &quot;customer_id&quot;: 101,<br>    &quot;status&quot;: &quot;SUSPENDED&quot;<br>  },<br>  &quot;operation&quot;: &quot;UPDATE&quot;,<br>  &quot;timestamp&quot;: &quot;2026-09-22T10:15:00Z&quot;<br>}</pre><p>The event tells consumers:</p><ul><li>What changed</li><li>What the previous value was</li><li>What the new value is</li><li>What operation occurred</li><li>When the change occurred</li></ul><p>This becomes extremely useful downstream.</p><p>For example, a consumer can reconstruct the current state without querying Oracle repeatedly.</p><h3>The Initial Load + CDC Problem</h3><p>One of the more subtle challenges is coordinating the initial load with CDC.</p><p>Consider this timeline:</p><pre>10:00 AM<br>Start full extraction</pre><pre>10:05 AM<br>Customer 100 updated in Oracle</pre><pre>10:10 AM<br>Full extraction reads Customer 100</pre><pre>10:15 AM<br>CDC captures the update</pre><p>Now the target system potentially sees:</p><pre>Initial value<br>      ↓<br>Updated value</pre><p>That’s expected.</p><p>But what happens if the initial load and CDC aren’t coordinated properly?</p><p>You can get:</p><ul><li>Missing changes</li><li>Duplicate changes</li><li>Out-of-order data</li><li>Incorrect final state</li></ul><p>Therefore, the ingestion architecture must establish a reliable relationship between:</p><p><strong>the point-in-time snapshot</strong></p><p>and</p><p><strong>the CDC stream starting from that point.</strong></p><p>This is one of the reasons production CDC implementations require significantly more thought than simply enabling a connector.</p><h3>Where Does S3 Fit?</h3><p>Kafka is excellent for streaming events, but it isn’t necessarily the best long-term analytical storage layer.</p><p>For the cloud data platform, S3 provides durable and cost-effective storage.</p><p>The architecture can therefore evolve into:</p><pre>                        Oracle<br>                           │<br>                 ┌─────────┴─────────┐<br>                 │                   │<br>              Full Load             CDC<br>                 │                   │<br>                 ▼                   ▼<br>                S3                 MSK<br>                                     │<br>                                     ▼<br>                               Stream Processing<br>                                     │<br>                                     ▼<br>                                    S3</pre><p>S3 becomes the durable foundation.</p><p>MSK handles the <strong>movement of changes</strong>.</p><p>S3 handles the <strong>long-term storage of data</strong>.</p><p>This separation is important.</p><p>It allows the streaming infrastructure and analytical storage infrastructure to evolve independently.</p><h3>What About PostgreSQL?</h3><p>Cloud modernization doesn’t always mean immediately replacing the operational database.</p><p>There may be applications that still require a relational target.</p><p>For example:</p><pre>Oracle<br>   │<br> Debezium<br>   │<br>   ▼<br> MSK<br>   │<br>   ├──────────────► S3<br>   │<br>   └──────────────► PostgreSQL</pre><p>Kafka becomes the intermediary.</p><p>A Kafka Connect JDBC sink, for example, can consume CDC events and apply them to PostgreSQL.</p><p>This architecture provides an important capability:</p><p><strong>one source event stream can support multiple consumers.</strong></p><p>The same change could eventually feed:</p><ul><li>PostgreSQL</li><li>S3</li><li>Iceberg</li><li>Search indexes</li><li>Analytics systems</li><li>Machine learning pipelines</li></ul><p>without creating a separate Oracle integration for each one.</p><h3>Failure Is Part of the Architecture</h3><p>A production data pipeline shouldn’t be designed around the assumption that everything works.</p><p>Things will fail.</p><p>For example:</p><pre>Oracle<br>   ↓<br>Debezium<br>   ↓<br>MSK<br>   ↓<br>Consumer<br>   X<br>PostgreSQL</pre><p>What happens when PostgreSQL becomes unavailable?</p><p>If the consumer simply drops the event, we’ve created data loss.</p><p>Kafka provides an important capability here: <strong>durable event retention</strong>.</p><p>The consumer can stop processing temporarily while the events remain available in Kafka.</p><p>Once PostgreSQL becomes healthy again:</p><pre>MSK<br> │<br> │ retained events<br> ▼<br>Consumer<br> │<br> ▼<br>PostgreSQL</pre><p>This is one of the reasons an event-streaming layer is valuable in a production architecture.</p><h3>But Reliability Requires More Than Kafka</h3><p>Kafka retention alone doesn’t guarantee that the target is correct.</p><p>A production pipeline needs observability.</p><p>Some useful metrics include:</p><h3>Source → Kafka</h3><ul><li>Connector status</li><li>CDC lag</li><li>Snapshot progress</li><li>Task failures</li></ul><h3>Kafka</h3><ul><li>Topic throughput</li><li>Partition distribution</li><li>Consumer lag</li><li>Under-replicated partitions</li></ul><h3>Kafka → Target</h3><ul><li>Records consumed</li><li>Records successfully written</li><li>Failed records</li><li>Retry counts</li><li>DLQ records</li></ul><h3>End-to-End</h3><p>Most importantly:</p><blockquote><strong><em>Does the target actually match the source?</em></strong></blockquote><p>That requires reconciliation.</p><p>For example:</p><pre>Oracle count       = 10,000,000<br>PostgreSQL count   = 10,000,000</pre><p>Counts alone aren’t sufficient, but they provide a useful first-level validation.</p><p>More sophisticated reconciliation can compare:</p><ul><li>Primary keys</li><li>Record hashes</li><li>Update timestamps</li><li>CDC offsets</li><li>Transaction positions</li></ul><h3>Security and Governance</h3><p>Another important consideration is that moving data to the cloud doesn’t eliminate security responsibilities.</p><p>The architecture should incorporate:</p><ul><li>Encryption at rest</li><li>Encryption in transit</li><li>IAM-based access</li><li>Network isolation</li><li>Least-privilege permissions</li><li>Secrets management</li><li>Data classification</li><li>Auditing</li></ul><p>For AWS-based platforms, services such as IAM, Lake Formation, KMS, and CloudTrail can become part of the broader architecture.</p><p>Security shouldn’t be added after the pipeline is built.</p><p>It should be part of the platform design from the beginning.</p><h3>The Resulting Architecture</h3><p>Putting everything together:</p><pre>                         ┌───────────────────┐<br>                         │   Oracle Database │<br>                         │   System of Record│<br>                         └─────────┬─────────┘<br>                                   │<br>                    ┌──────────────┴──────────────┐<br>                    │                             │<br>                 Full Load                       CDC<br>                    │                             │<br>                    ▼                             ▼<br>                   S3                         Debezium<br>                    │                             │<br>                    │                             ▼<br>                    │                        Amazon MSK<br>                    │                       /     |     \<br>                    │                      /      |      \<br>                    │                     ▼       ▼       ▼<br>                    │                    S3   PostgreSQL Analytics<br>                    │<br>                    ▼<br>             Data Processing<br>                    │<br>                    ▼<br>             Apache Iceberg<br>                    │<br>             ┌──────┼──────┐<br>             ▼      ▼      ▼<br>          Athena Redshift ML/AI</pre><p>This architecture separates the major responsibilities:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jZ14iS3EzIuvOWej2TJlIg.png" /></figure><h3>The Bigger Architectural Lesson</h3><p>The most important lesson isn’t that <strong>Oracle can be connected to MSK</strong>.</p><p>It is that modern data platforms work best when we separate:</p><p><strong>Source systems</strong></p><p>from</p><p><strong>data movement</strong></p><p>from</p><p><strong>data storage</strong></p><p>from</p><p><strong>data processing</strong></p><p>from</p><p><strong>data consumption</strong>.</p><p>That separation gives each layer a clear responsibility.</p><p>More importantly, it allows the platform to evolve.</p><p>You can change the downstream consumer without changing the source system.</p><p>You can introduce new analytical workloads without redesigning the ingestion layer.</p><p>You can add new consumers to the event stream without creating another point-to-point integration.</p><p>And you can retain historical data independently from the streaming infrastructure.</p><p>That is what turns a collection of pipelines into a <strong>data platform</strong>.</p><h3>What’s Next?</h3><p>In the next part of this series, we’ll go deeper into the most interesting component of this architecture:</p><h3>CDC in Production: What Happens Between Oracle and Kafka?</h3><p>We’ll look at:</p><ul><li>How Debezium captures Oracle changes</li><li>Oracle LogMiner</li><li>Supplemental logging</li><li>Initial snapshots</li><li>CDC offsets</li><li>INSERT, UPDATE and DELETE events</li><li>Tombstone records</li><li>Schema evolution</li><li>Kafka topic design</li><li>Consumer groups</li><li>Failure and recovery scenarios</li></ul><p>Because getting data from Oracle into Kafka is relatively easy.</p><p><strong>Getting it right in production is the hard part.</strong></p><p><em>This article describes a representative enterprise architecture based on common production data-engineering patterns. Specific implementation details vary by organization, workload, compliance requirements, and target architecture.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f568e56998a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>