apache / apache/pulsar-connectors
[feat][io] Add Debezium Db2 source connector
- Dominant language
- Java
- Stars
- 26
- Forks
- 25
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 1
Description
## Motivation
Debezium ships a Db2 source connector (`io.debezium:debezium-connector-db2`, present in the `debezium-bom` at our pinned version), but this repository does not wrap it. We currently wrap 5 of Debezium's 12 source connectors: MySQL, PostgreSQL, MongoDB, Oracle, and SQL Server.
Db2 is a mature Debezium connector with real enterprise demand, and its CDC model (capture tables, populated by an ASN capture agent) is close enough to SQL Server's that the existing `debezium/mssql` module is a reasonable structural template.
## Proposal
Add a `debezium/db2` module (`pulsar-io-debezium-db2`) following the structure of the existing Debezium modules:
- `DebeziumDb2Source` extending `DebeziumSource`
- `include("debezium:pulsar-io-debezium-db2")` in `settings.gradle.kts`
- `debezium-connector-db2 = { module = "io.debezium:debezium-connector-db2" }` in the version catalog
- NAR packaging + distribution wiring
- A Testcontainers integration test using the `icr.io/db2_community/db2` image
## Notes
- **Check whether Db2 is a multi-partition connector.** If it is, it will hit the same `task.id` gap as SQL Server (#61), where `AbstractKafkaConnectSource` never calls `connector.taskConfigs()` for Debezium sources. #61 should ideally land first.
- Verify the Db2 JDBC driver (`com.ibm.db2:jcc`) reaches the NAR at runtime; `debezium-connector-db2` may not bundle it. (For comparison, `debezium-connector-oracle` *does* pull `ojdbc11` transitively — verified in #62.)
- The Db2 container image is large and requires accepting a license and privileged mode; evaluate CI runtime cost before committing to running its test on every PR.
- Use the `GenericContainer` pattern (see the Testcontainers version conflict noted in #62).
_Identified by a scan of the Debezium connector catalog against our connector inventory._
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing the existing debezium/mssql module and its DebeziumSource entry point, then inspect settings.gradle.kts and the version catalog for connector wiring. Check the Db2 connector's partitioning and JDBC-driver runtime behavior, and review the Testcontainers GenericContainer pattern. Done means the db2 module is packaged and distributed correctly with an integration test using the specified Db2 image.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100