[feat][io] Add Debezium MariaDB source connector#69
Merged
david-streamlio merged 1 commit intoJul 9, 2026
Merged
Conversation
Debezium ships a MariaDB source connector but this repository did not wrap it. Add pulsar-io-debezium-mariadb, following the structure of the existing MySQL module: both connectors build on Debezium's shared binlog base. Includes a unit suite covering the connector/task class defaulting and validation, and a Testcontainers integration test that runs the source against a real MariaDB server and asserts the initial snapshot produces CDC records.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Debezium-based MariaDB source connector module to the Pulsar connectors repository, mirroring the existing Debezium MySQL module and wiring it into build/distribution artifacts.
Changes:
- Introduces
debezium/mariadb(pulsar-io-debezium-mariadb) withDebeziumMariaDbSource, service descriptor, and sample config. - Adds unit tests validating connector/task class defaulting and mismatch rejection, plus an end-to-end Testcontainers integration test against
mariadb:11.4. - Wires the new NAR into Gradle settings, version catalog, docs, docker image build, and distribution assembly.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| settings.gradle.kts | Includes the new debezium:pulsar-io-debezium-mariadb subproject. |
| gradle/libs.versions.toml | Adds the Debezium MariaDB connector artifact to the version catalog. |
| docs/build.gradle.kts | Ensures docs aggregation includes the new Debezium MariaDB module. |
| docker/pulsar-all/build.gradle.kts | Includes the MariaDB Debezium NAR in the “pulsar-all” connector set. |
| distribution/io/src/assemble/io.xml | Adds the MariaDB Debezium NAR to the IO distribution assembly list. |
| distribution/io/build.gradle.kts | Includes the MariaDB Debezium NAR in the IO distribution dependencies. |
| debezium/mariadb/build.gradle.kts | Defines the new module’s build, dependencies, and test dependencies. |
| debezium/mariadb/src/main/java/org/apache/pulsar/io/debezium/mariadb/DebeziumMariaDbSource.java | Implements the MariaDB Debezium Source wrapper by pinning connector/task classes. |
| debezium/mariadb/src/main/java/org/apache/pulsar/io/debezium/mariadb/package-info.java | Adds package metadata for the new module. |
| debezium/mariadb/src/main/resources/META-INF/services/pulsar-io.yaml | Registers the connector for discovery via Pulsar IO service loading. |
| debezium/mariadb/src/main/resources/debezium-mariadb-source-config.yaml | Provides a sample YAML config for running the MariaDB source. |
| debezium/mariadb/src/test/java/org/apache/pulsar/io/debezium/mariadb/DebeziumMariaDbSourceConfigTest.java | Unit tests validating connector/task class defaulting and validation. |
| debezium/mariadb/src/test/java/org/apache/pulsar/io/debezium/mariadb/DebeziumMariaDbSourceTest.java | Integration test exercising snapshot CDC against a real MariaDB container + Pulsar schema history. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #65
Motivation
Debezium ships a MariaDB source connector (
io.debezium:debezium-connector-mariadb, present in thedebezium-bomat our pinned version), but this repository did not wrap it. We wrapped 5 of Debezium's 12 source connectors; MariaDB was the most valuable gap:debezium-connector-binlogbase — so the existingdebezium/mysqlmodule is a near drop-in template.Modifications
New
debezium/mariadbmodule (pulsar-io-debezium-mariadb), mirroringdebezium/mysql:DebeziumMariaDbSourceextendingDebeziumSource, pinning Debezium'sMariaDbConnector/MariaDbConnectorTaskMETA-INF/services/pulsar-io.yaml) and sample source configsettings.gradle.ktsinclude, and wiring intodistribution/io,docker/pulsar-all, the assembly XML, anddocsTest suite
Unit tests (
DebeziumMariaDbSourceConfigTest, 7 cases, no database required) cover the connector/task class contract, which is otherwise a silent misconfiguration that only surfaces at runtime:Class.forName, proving the string literals name real classes on the runtime classpathIntegration test (
DebeziumMariaDbSourceTest) runs the source against a realmariadb:11.4server plus aPulsarContainerfor Debezium's schema history, seeds two rows, and asserts the initial snapshot emits CDC records.Verifying this change
NAR packaging verified:
pulsar-io-debezium-mariadb-4.3.0-SNAPSHOT.narbuilds.Notes
GenericContainerpattern rather than Testcontainers'MariaDBContainer:debezium-bompins Testcontainers core to 2.x, while the specialized modules still target 1.21.x and reference shaded classes removed in 2.x (see [improve][test] Add Debezium Oracle source integration test #62).timeOutbecausesource.read()blocks — without it, a connector that never emits would hang until the CI job's own timeout rather than failing.jdbc:mariadb:scheme and no longer handlesjdbc:mysql:URLs.task.idgap described in [Bug] Debezium SQL Server source fails to start: multi-partition connector never receives task.id #61.