Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package com.xtrmetl.cdc.spi;

import org.springframework.stereotype.Component;

import java.util.Set;

/**
* Scaffold for MySQL binlog CDC via Debezium. Not on the classpath / not started.
* Non-production reference scaffold for a future MySQL binlog CDC integration via Debezium.
*
* <p>This type is intentionally not a Spring component. Production source discovery must not
* advertise MySQL until the connector dependency, lifecycle, offsets/history, prerequisites,
* recovery and realistic integration behavior are implemented and verified.</p>
*/
@Component
public final class MysqlDebeziumCdcSource extends AbstractScaffoldCdcSource {

public static final String ID = "mysql-debezium";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.xtrmetl.cdc.service.CdcService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -44,7 +45,12 @@ void postgresSpiStartAndStopDelegateToCdcService() throws Exception {
}

@Test
void registersScaffoldSourcesWhenProvided() {
void mysqlScaffoldIsNotAutoDiscoveredAsAProductionSource() {
assertFalse(MysqlDebeziumCdcSource.class.isAnnotationPresent(Component.class));
}

@Test
void registersScaffoldSourcesWhenProvidedExplicitly() {
CdcSourceRegistry registry = new CdcSourceRegistry(List.of(
new PostgresDebeziumCdcSource(),
new MysqlDebeziumCdcSource(),
Expand Down
7 changes: 4 additions & 3 deletions docs/cdc/any-to-any-cdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ Package: `com.xtrmetl.cdc.spi`
- `CdcSourceConnector` — lifecycle + start/stop capture
- `SourceCapabilities` — declares engine (debezium/logminer/… ), databases supported
- `PostgresDebeziumCdcSource` — adapter wrapping existing `CdcService` configuration surface
- `CdcSourceRegistry` — discovery; exposed via `GET /api/cdc/sources` and status payload
- `CdcSourceRegistry` — production discovery; exposed via `GET /api/cdc/sources` and status payload
- `MysqlDebeziumCdcSource` — non-production reference scaffold only; intentionally not a Spring component until real MySQL CDC support is implemented

## Target SPI (Java)

Expand All @@ -79,11 +80,11 @@ xtrmetl:
```

- **Declared** in `application.yml` / `XtrmetlProperties.Cdc.sources` and reported on `GET /api/cdc/status` as `configuredSources` via `CdcSourceFactory`.
- **Registered types:**
- **Production-discovered types:**
| Type id | Status |
|:--------|:-------|
| `postgres-debezium` | **Live** — SPI `start`/`stop` delegates to `CdcService` |
| `mysql-debezium` | Scaffold only (no connector JAR) |
| `mysql-debezium` | **Not registered** — reference scaffold only; configured use resolves as unknown source type |
| `sqlserver-debezium` | Scaffold only (no connector JAR) |
- **Live engine:** still a single Debezium Postgres path in `CdcService` (multi-source start not implemented).
- Targets remain: Kafka (live raw publish) + optional JDBC replica (`replica.enabled`).
Expand Down
Loading