Commit fefd539
feat(kafka): complete & validate agent-side dual-provider (Pulsar+Kafka) CDC
Make the CDC agent publish change events to either Pulsar or Kafka/Confluent
via the messaging abstraction, with configurable serialization. Pulsar wire
format is unchanged; the active provider is selected at runtime.
Serialization
- commons: add MutationValueCodec, a canonical registry-less Avro codec for
MutationValue shared by producer and (future) consumer.
- messaging-kafka: introduce a KafkaSerde strategy (RawAvroSerde registry-less
default + RegistryAvroSerde Confluent), replacing the registry-mandatory
KafkaSchemaProvider. Wire producer/consumer/client to it.
- agent: AbstractMessagingMutationSender branches by provider — Pulsar keeps its
exact schema/format; Kafka uses raw Avro (default) or Confluent registry when
kafkaSchemaRegistryUrl is set.
Bug fixes (also affecting CI)
- Agents passed Platform.PULSAR, rejecting all Kafka params; pass Platform.ALL
and treat ALL as a wildcard in AgentConfig.configure.
- ProducerConfigBuilder.sendTimeoutMs(0) was rejected though 0 = infinite
(Pulsar-compatible); allow 0, reject only negative.
- CassandraContainer.createCassandraContainerWithAgentKafka now sets
messagingProvider=kafka.
- Bump Testcontainers 1.19.1 -> 1.20.6 and force the docker-java API version via
the api.version system property (newer Docker engines reject the 1.32 default);
CI passes -Papi.version=1.43.
Tests & CI
- Add unit tests for the messaging modules (codec, raw-avro serde, serde
selection, SPI discovery, producer config validation).
- Add KafkaSingleNodeC4Tests (Testcontainers cp-kafka), tagged @tag("kafka");
excluded from default runs, included via -PkafkaTests.
- Re-enable the test-kafka CI job; add -Papi.version to the test jobs.
Docs
- docs/KAFKA_SUPPORT.md describing agent Kafka config and serialization modes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 72601ad commit fefd539
32 files changed
Lines changed: 1261 additions & 445 deletions
File tree
- .github/workflows
- agent-c3
- src/main/java/com/datastax/oss/cdc/agent
- agent-c4
- src
- main/java/com/datastax/oss/cdc/agent
- test/java/com/datastax/oss/cdc/agent
- agent-dse4/src/main/java/com/datastax/oss/cdc/agent
- agent/src/main/java/com/datastax/oss/cdc/agent
- commons
- src
- main/java/com/datastax/oss/cdc
- test/java/com/datastax/oss/cdc
- docs
- messaging-api/src
- main/java/com/datastax/oss/cdc/messaging/config/impl
- test/java/com/datastax/oss/cdc/messaging/config
- messaging-kafka
- src
- main/java/com/datastax/oss/cdc/messaging/kafka
- serde
- test/java/com/datastax/oss/cdc/messaging/kafka
- serde
- messaging-pulsar
- src/test/java/com/datastax/oss/cdc/messaging/pulsar
- testcontainers/src/main/java/com/datastax
- oss/cdc
- testcontainers/cassandra
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
0 commit comments