Skip to content

Commit

Permalink
bulk-cdk-toolkits-extract-cdc,source-mysql-v2: flesh out CDC
Browse files Browse the repository at this point in the history
  • Loading branch information
postamar committed Sep 25, 2024
1 parent 870b2f7 commit bfb4312
Show file tree
Hide file tree
Showing 25 changed files with 1,089 additions and 1,559 deletions.
1 change: 1 addition & 0 deletions airbyte-cdk/bulk/toolkits/extract-cdc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dependencies {
implementation project(':airbyte-cdk:bulk:core:bulk-cdk-core-extract')
implementation 'io.debezium:debezium-api:2.7.1.Final'
implementation 'io.debezium:debezium-embedded:2.7.1.Final'
implementation 'io.debezium:debezium-storage-file:2.7.1.Final'

implementation 'commons-io:commons-io:2.17.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,30 @@

package io.airbyte.cdk.command

/** Subtype of [SourceConfiguration] for CDC sources. */
interface CdcSourceConfiguration : SourceConfiguration {}
import io.micronaut.context.annotation.Factory
import jakarta.inject.Singleton
import java.time.Duration

/** CDC-specific flavor of [SourceConfiguration]. */
interface CdcSourceConfiguration : SourceConfiguration {

/**
* How often Debezium is to emit heartbeat events.
*
* This value is typically much lower in tests than in production.
*/
val debeziumHeartbeatInterval: Duration

/**
* Micronaut factory which glues [ConfigurationJsonObjectSupplier] and
* [SourceConfigurationFactory] together to produce a [CdcSourceConfiguration] singleton.
*/
@Factory
private class MicronautFactory {
@Singleton
fun <I : ConfigurationJsonObjectBase> cdcSourceConfig(
pojoSupplier: ConfigurationJsonObjectSupplier<I>,
factory: SourceConfigurationFactory<I, out CdcSourceConfiguration>,
): CdcSourceConfiguration = factory.make(pojoSupplier.get())
}
}

This file was deleted.

Loading

0 comments on commit bfb4312

Please sign in to comment.