<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Google Cloud PubSub on Jaehyeon Kim</title><link>https://jaehyeon.me/tags/google-cloud-pubsub/</link><description>Recent content in Google Cloud PubSub on Jaehyeon Kim</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>Copyright © 2023-2026 Jaehyeon Kim. All Rights Reserved.</copyright><lastBuildDate>Thu, 07 Nov 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://jaehyeon.me/tags/google-cloud-pubsub/index.xml" rel="self" type="application/rss+xml"/><item><title>Change Data Capture (CDC) Local Development with PostgreSQL, Debezium Server and Pub/Sub Emulator</title><link>https://jaehyeon.me/blog/2024-11-07-cdc-local-dev/</link><pubDate>Thu, 07 Nov 2024 00:00:00 +0000</pubDate><guid>https://jaehyeon.me/blog/2024-11-07-cdc-local-dev/</guid><description><![CDATA[<p><em>Change data capture</em> (CDC) is a data integration pattern to track changes in a database so that actions can be taken using the changed data. <a href="https://debezium.io/" target="_blank" rel="noopener noreferrer"><em>Debezium</em><i class="fas fa-external-link-square-alt ms-1"></i></a> is probably the most popular open source platform for CDC. Originally providing Kafka source connectors, it also supports a ready-to-use application called <a href="https://debezium.io/documentation/reference/stable/operations/debezium-server.html" target="_blank" rel="noopener noreferrer">Debezium server<i class="fas fa-external-link-square-alt ms-1"></i></a>. The standalone application can be used to stream change events to other messaging infrastructure such as Google Cloud Pub/Sub, Amazon Kinesis and Apache Pulsar. In this post, we develop a CDC solution locally using Docker. The source of the <a href="https://console.cloud.google.com/marketplace/product/bigquery-public-data/thelook-ecommerce" target="_blank" rel="noopener noreferrer">theLook eCommerce<i class="fas fa-external-link-square-alt ms-1"></i></a> is modified to generate data continuously, and the data is inserted into multiple tables of a PostgreSQL database. Among those tables, two of them are tracked by the Debezium server, and it pushes row-level changes of those tables into Pub/Sub topics on the <a href="https://cloud.google.com/pubsub/docs/emulator" target="_blank" rel="noopener noreferrer">Pub/Sub emulator<i class="fas fa-external-link-square-alt ms-1"></i></a>. Finally, messages of the topics are read by a Python application.</p>]]></description><enclosure url="https://jaehyeon.me/blog/2024-11-07-cdc-local-dev/featured.png" length="83605" type="image/png"/></item></channel></rss>