<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Marta @ Hossted</title>
    <description>The latest articles on DEV Community by Marta @ Hossted (@marta-hossted).</description>
    <link>https://dev.to/marta-hossted</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3929328%2F7696a04b-6caf-4db8-bb4a-9e5877870e62.png</url>
      <title>DEV Community: Marta @ Hossted</title>
      <link>https://dev.to/marta-hossted</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/marta-hossted"/>
    <language>en</language>
    <item>
      <title>Debezium Won't Start? The Whitespace Bug That Stumped Our Client</title>
      <dc:creator>Marta @ Hossted</dc:creator>
      <pubDate>Wed, 13 May 2026 13:02:58 +0000</pubDate>
      <link>https://dev.to/marta-hossted/debezium-wont-start-the-whitespace-bug-that-stumped-our-client-2k73</link>
      <guid>https://dev.to/marta-hossted/debezium-wont-start-the-whitespace-bug-that-stumped-our-client-2k73</guid>
      <description>&lt;h1&gt;
  
  
  Debezium Won't Start? The Whitespace Bug That Stumped Our Client
&lt;/h1&gt;

&lt;p&gt;We recently got a support ticket that looked simple at first. A client's Debezium MySQL connector kept failing at startup. The error pointed to &lt;code&gt;message.key.columns&lt;/code&gt;. The config looked reasonable. But nothing worked.&lt;/p&gt;

&lt;p&gt;Here's what happened — and how we fixed it without touching the database schema.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;The client had a MySQL table with a space in its name: &lt;code&gt;dbo.Sourcing Id Master&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;They configured the connector like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"message.key.columns"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"dbo.Sourcing Id Master:id"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Connector validation failed immediately. They tried escaping — backslashes, quotes, every combination. Same error every time.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Escaping Doesn't Work Here
&lt;/h2&gt;

&lt;p&gt;The problem isn't at runtime. It's at config validation time.&lt;/p&gt;

&lt;p&gt;Debezium's validator for &lt;code&gt;message.key.columns&lt;/code&gt; requires the fully-qualified table identifier to contain no whitespace. The validator rejects it before the connector even connects to MySQL. No escaping fixes this.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Fix
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1 — capture the table via table.include.list&lt;/strong&gt; (accepts spaces fine):&lt;/p&gt;

&lt;p&gt;"table.include.list": "dbo\.Sourcing Id Master"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2 — build the message key with a ValueToKey SMT:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"transforms": "ValueToKey",&lt;br&gt;
"transforms.ValueToKey.type": "org.apache.kafka.connect.transforms.ValueToKey",&lt;br&gt;
"transforms.ValueToKey.fields": "id"&lt;/p&gt;

&lt;p&gt;Debezium includes primary key fields in the record value anyway — the SMT pulls &lt;code&gt;id&lt;/code&gt; from there and sets it as the Kafka message key, bypassing the validator entirely.&lt;/p&gt;




&lt;h2&gt;
  
  
  Result
&lt;/h2&gt;

&lt;p&gt;Connector starts. Table captured. Keys work. Zero schema changes.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;At &lt;a href="https://hossted.com/?utm_source=devto&amp;amp;utm_medium=article" rel="noopener noreferrer"&gt;Hossted&lt;/a&gt;, we help enterprises run open source in production — Kafka, Debezium, PostgreSQL, Kubernetes and more. Follow us on &lt;a href="https://www.linkedin.com/company/hossted" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; for more cases like this.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>kafka</category>
      <category>opensource</category>
      <category>database</category>
    </item>
  </channel>
</rss>
